[PATCH] Add --with-nonshared-cflags option to configure

Florian Weimer fweimer@redhat.com
Thu Aug 16 17:45:00 GMT 2018


On 08/16/2018 07:19 PM, Carlos O'Donell wrote:

>> +@item --with-nonshared-cflags=@var{cflags}
>> +Use additional compiler flags @var{cflags} to build the parts of the
>> +library which are always statically linked into applications and
>> +libraries even with shared linking (that is, the object files contained
>> +in @file{lib*_nonshared.a} libraries).  The build process will
>> +automatically use the appropriate flags, but this option can be used to
>> +set additional flags required for building applications and libraries,
>> +to match local policy.
>> +
> 
> I'd like to see an example added to this to show what the flag is used for.

Our use-case is to compile with -Wp,-D_FORTIFY_SOURCE=2, which does not 
change the compiled code, only the metadata embedded in the nonshared 
objects.  Which makes this feature *really* obscure, of course.

> P.S. Is there any way I can convince you to fix bug 17248 given that you're
> looking at CFLAGS? :-)

Can we do anything else but remove the sorting and deduplication?  This 
was added such a long time ago that we don't have a record why this was 
needed.

I can check that the binaries on x86_64 do not change.

Thanks,
Florian



More information about the Libc-alpha mailing list