This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use $(DEFAULT-LDFLAGS-$(@F)) in +link-static-before-libc
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 4 Oct 2017 17:13:41 -0700
- Subject: Re: [PATCH] Use $(DEFAULT-LDFLAGS-$(@F)) in +link-static-before-libc
- Authentication-results: sourceware.org; auth=none
- References: <20171003224751.GA23183@gmail.com> <CAMe9rOo0Czus=riQ+UrEV9760b0r01LuA_ZYQ2UA1rzBANrrsg@mail.gmail.com> <mvm7ewb71re.fsf@suse.de> <CAMe9rOqbcNk=5cZGeipDjkwF3Bro8UZ0n2jPJ1hRq5DHxvJvSQ@mail.gmail.com>
On 10/4/17, H.J. Lu <hjl.tools@gmail.com> wrote:
> On 10/4/17, Andreas Schwab <schwab@suse.de> wrote:
>> On Okt 03 2017, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>>
>>> Use $(LDFLAGS-$(@F)) with tst-tls1-static-non-pie may not be sufficient
>>> when static PIE is built by default.
>>
>> Why is that not sufficient?
>>
>
> If GCC doesn't support -static-pie, -Wl,-pie -static is used to build
> static
> executables by default. We need to override it by
>
> $(firstword $(DEFAULT-LDFLAGS-$(@F)) $(default-pie-ldflag))
>
> to avoid passing -Wl,-pie -static to GCC.
>
I will check it in shortly.
--
H.J.