[PATCH] Pass -no-pie to GCC only if GCC defaults to PIE [BZ #22614]

Carlos O'Donell carlos@redhat.com
Mon Dec 18 19:43:00 GMT 2017


On 12/15/2017 06:29 PM, H.J. Lu wrote:
> After --enable-static-pie is added to configure, libc_cv_pie_default is
> set to yes when either --enable-static-pie is used to configure glibc
> or GCC defaults to PIE.  We should set no-pie-ldflag to -no-pie, which
> is supported on GCC 6 and later, only if GCC defaults to PIE, not when
> --enable-static-pie is used to configure glibc.
> 
> Tested on x32 with --enable-static-pie using GCC 5 and without
> --enable-static-pie using GCC 7.
> 
> OK for master?

LGTM.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list