This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Test for profiling support (_mcount/gprof)
- From: Andreas Schwab <schwab at suse dot de>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 05 Oct 2017 14:19:08 +0200
- Subject: Re: [PATCH] Test for profiling support (_mcount/gprof)
- Authentication-results: sourceware.org; auth=none
- References: <4d15086e-9e54-014b-1a50-16534f287e24@redhat.com> <mvm4lt9ui9h.fsf@suse.de> <539fb6f1-9d96-01d5-0f35-f3c312c0ecbb@redhat.com> <mvmshgtt2fd.fsf@suse.de> <87b76487-16d3-78b4-9651-f6d375b9b137@redhat.com> <mvma830t3id.fsf@suse.de> <36b6ab73-342d-0886-8767-ff7fd6dd4d79@redhat.com> <mvm1soct0tx.fsf@suse.de> <907f751a-3916-64c9-f650-df182fb3cdce@redhat.com> <479c33cb-62a2-4b56-8908-8adc0fd18a2a@redhat.com>
On Okt 05 2017, Florian Weimer <fweimer@redhat.com> wrote:
> On 08/16/2017 10:09 AM, Florian Weimer wrote:
>> 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<fweimer@redhat.com>
>>
>> * 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)tst-gmon.data
>
> Is this patch still needed?
Sure.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."