This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: What is the minimum acceptable optimization for compiling glibc?
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-help at sourceware dot org, howard_b_golden at yahoo dot com
- Date: Sat, 5 Dec 2009 17:29:25 -0500
- Subject: Re: What is the minimum acceptable optimization for compiling glibc?
- References: <200912051306.13708.hgolden@socal.rr.com> <200912051720.59203.vapier@gentoo.org>
On Sat, Dec 5, 2009 at 5:20 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Saturday 05 December 2009 16:06:13 Howard B. Golden wrote:
>> I understand that it isn't possible to compile glibc without
>> optimization. However, I would like to use the minimum acceptable
>> optimization so I can trace how the dynamic loading code works, with the
>> compiled code as close to the source as possible.
>>
>> In other words, if I include -O1, can I then turn off some of the
>> optimizations included in -O1 and still compile successfully? If so,
>> what CFLAGS should I use? Thanks!
>
> use -O1. ?anything less and you're on your own. ?the exact answer may depend
> on both the gcc version and the architecture/abi.
In order to avoid relocations in the early dynamic loader startup
(before relocations themselves have been processed) certain functions
*must* be inlined by the compiler. If such functions fail to be
inlined you will see a crash calling the function that was not
inlined.
Cheers,
Carlos.