This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Test for profiling support (_mcount/gprof)

On 08/16/2017 09:43 AM, Andreas Schwab wrote:

One has to download the whole log file to find this:

[ 2374s] gcc: error: -pg and -fomit-frame-pointer are incompatible

This looks like a GCC deficiency.  Anyway, please try the attached patch.

tst-gmon: Build with -fno-omit-frame-pointer

If glibc is built with -fomit-frame-pointer to undo the effect of
configuring GCC with --enable-frame-pointer, using -pg by itself results
in a build failure:

gcc: error: -pg and -fomit-frame-pointer are incompatible

2017-08-16  Florian Weimer  <>

	* gmon/Makefile (CFLAGS-tst-gmon.c): Add -fno-omit-frame-pointer.

diff --git a/gmon/Makefile b/gmon/Makefile
index 39f11acec2..62d96543ff 100644
--- a/gmon/Makefile
+++ b/gmon/Makefile
@@ -38,7 +38,7 @@ endif
 # The mcount code won't work without a frame pointer.
 CFLAGS-mcount.c := -fno-omit-frame-pointer
-CFLAGS-tst-gmon.c := -pg
+CFLAGS-tst-gmon.c := -fno-omit-frame-pointer -pg
 LDFLAGS-tst-gmon := $(no-pie-ldflag)
 CRT-tst-gmon := $(csu-objpfx)gcrt1.o
 tst-gmon-ENV := GMON_OUT_PREFIX=$(objpfx)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]