This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add --with-nonshared-cflags option to configure
On 08/16/2018 01:45 PM, Florian Weimer wrote:
> 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.
Please add this as a comment or description in install.texi, much
like CFLAGS sorting, I want to come back to this 10 years later,
read the comment and understand the intent.
>> 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.
Right, I think that's the only solution, and what we should do.
This leaves CFLAGS as expected without sorting (which might
change based on locale?).
--
Cheers,
Carlos.