aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-03-10 16:25:33 -0700
committerH.J. Lu <hjl.tools@gmail.com>2025-03-29 07:03:46 -0700
commit8497f4cc42399deb9356de7f65f2bba1924e0954 (patch)
tree77359582195150f9a717f94e5d865b2ca1bf8aff
parentbdf6bbc0a7ffd2013823e80f5d49e7a3cdf16146 (diff)
downloadbinutils-8497f4cc42399deb9356de7f65f2bba1924e0954.zip
binutils-8497f4cc42399deb9356de7f65f2bba1924e0954.tar.gz
binutils-8497f4cc42399deb9356de7f65f2bba1924e0954.tar.bz2
gprof: Always compile tests with -g
Always compile gprof testsuite with -g for line number info checked by tst-gmon-gprof-l.sh. PR gprof/32779 * testsuite/Makefile.am (GPROF_FLAGS): Add -g. (COMPILE): Set to "$(CC) $(AM_CFLAGS) $(GPROF_FLAGS)". (LINK) Set to "$(CC) $(AM_CFLAGS) $(GPROF_FLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@". * testsuite/Makefile.in: Regenerated. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-rw-r--r--gprof/testsuite/Makefile.am10
-rw-r--r--gprof/testsuite/Makefile.in12
2 files changed, 10 insertions, 12 deletions
diff --git a/gprof/testsuite/Makefile.am b/gprof/testsuite/Makefile.am
index c4d6c41..0c80b12 100644
--- a/gprof/testsuite/Makefile.am
+++ b/gprof/testsuite/Makefile.am
@@ -6,12 +6,12 @@ GPROF = ../gprof$(EXEEXT)
# NB: -O2 -fno-omit-frame-pointer is needed for expected call graph. See
# https://sourceware.org/bugzilla/show_bug.cgi?id=32768
-GPROF_FLAGS = -O2 -fno-omit-frame-pointer -pg
+# -g is needed for line number info checked by tst-gmon-gprof-l.sh. See
+# https://sourceware.org/bugzilla/show_bug.cgi?id=32779
+GPROF_FLAGS = -O2 -fno-omit-frame-pointer -pg -g
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(GPROF_FLAGS)
-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(OPT_NO_PLUGINS) $(GPROF_FLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+COMPILE = $(CC) $(AM_CFLAGS) $(GPROF_FLAGS)
+LINK = $(CC) $(AM_CFLAGS) $(GPROF_FLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
# We will add to these later, for each individual test. Note
# that we add each test under check_SCRIPTS;
diff --git a/gprof/testsuite/Makefile.in b/gprof/testsuite/Makefile.in
index 008f6be..2ac5f24 100644
--- a/gprof/testsuite/Makefile.in
+++ b/gprof/testsuite/Makefile.in
@@ -496,13 +496,11 @@ GPROF = ../gprof$(EXEEXT)
# NB: -O2 -fno-omit-frame-pointer is needed for expected call graph. See
# https://sourceware.org/bugzilla/show_bug.cgi?id=32768
-GPROF_FLAGS = -O2 -fno-omit-frame-pointer -pg
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(GPROF_FLAGS)
-
-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(OPT_NO_PLUGINS) $(GPROF_FLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-
+# -g is needed for line number info checked by tst-gmon-gprof-l.sh. See
+# https://sourceware.org/bugzilla/show_bug.cgi?id=32779
+GPROF_FLAGS = -O2 -fno-omit-frame-pointer -pg -g
+COMPILE = $(CC) $(AM_CFLAGS) $(GPROF_FLAGS)
+LINK = $(CC) $(AM_CFLAGS) $(GPROF_FLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
# We will add to these later, for each individual test. Note
# that we add each test under check_SCRIPTS;