]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gprof: Always compile tests with -g
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 10 Mar 2025 23:25:33 +0000 (16:25 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 29 Mar 2025 14:03:46 +0000 (07:03 -0700)
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>
gprof/testsuite/Makefile.am
gprof/testsuite/Makefile.in

index c4d6c41fcf4861e0ed8922977af63d96520665ae..0c80b12e6e4628754570a528948657027117645b 100644 (file)
@@ -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;
index 008f6be879e3b42a8cbfd2be87dee33430b87edf..2ac5f241012715be820d1645c420d0549ae18c9c 100644 (file)
@@ -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;