free (rc_path);
// Read system-wide file
- rc_path = dbe_sprintf (NTXT ("%s/gprofng.rc"), SYSCONFDIR);
+ const char *sysconfdir = getenv("GPROFNG_SYSCONFDIR");
+ if (sysconfdir == NULL)
+ sysconfdir = SYSCONFDIR;
+ rc_path = dbe_sprintf (NTXT ("%s/gprofng.rc"), sysconfdir);
if (access (rc_path, R_OK | F_OK) != 0)
{
StringBuilder sb;
# dir cflags gprofflags Others
set table {
{"jsynprog" "-g -Wall" "-p on -j on"}
- {"mttest" "" ""}
- {"mttest" "-g -Wall" "-p on"}
{"mttest" "-g -O0" "-p on"}
- {"mttest" "-g -O" "-p on"}
- {"mttest" "-g -O" "-h on"}
- {"mttest" "-g -O" "-h on"}
- {"mttest" "-g -O" "-p on -h on"}
- {"synprog" "" ""}
- {"synprog" "-g" "-p on"}
+ {"mttest" "-g -O0" "-p on -h on"}
{"synprog" "-g -O0" "-p on"}
- {"synprog" "-g -O" "-p on"}
- {"synprog" "-g" "-p on -h on"}
- {"synprog" "-g -O0" "-p on -h on"}
- {"synprog" "-g -O" "-p on -h on"}
+ {"synprog" "-g -O0" "-p on -h on"}
}
}
aarch64 {
set table {
{"jsynprog" "-g -Wall" "-p on -j on"}
- {"mttest" "" ""}
- {"mttest" "-g -Wall" "-p on"}
{"mttest" "-g -O0" "-p on"}
- {"mttest" "-g -O" "-p on"}
- {"synprog" "" ""}
- {"synprog" "-g" "-p on"}
- {"synprog" "-g -O" "-p on"}
+ {"synprog" "-g -O0" "-p on"}
}
}
default {
# Columns in the table represent:
# dir cflags gprofflags Others
set table {
+ {"jsynprog" "" ""}
{"mttest" "" ""}
{"synprog" "" ""}
}
gprofng_dir := $(shell dirname $$(find ../root -name libgprofng.so.0 | head -1))
export LD_LIBRARY_PATH := $(gprofng_dir):$(gprofng_dir)/..
+# Set GPROFNG_SYSCONFDIR to find out gprofng.rc:
+export GPROFNG_SYSCONFDIR := $(srcdir)/../../../src
+
.PHONY: all collect compare clobber clean
all: compare