This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Weaken PIE configure test to a compile test
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 28 May 2012 20:16:39 -0400
- Subject: Re: Weaken PIE configure test to a compile test
- References: <Pine.LNX.4.64.1205282209180.2726@digraph.polyomino.org.uk>
On Mon, May 28, 2012 at 6:11 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> One remaining configure test that produces different results in
> bootstrap builds because it tries linking against a preexisting libc
> is the test for position-independent executable support.
>
> I propose this patch, weakening it to a compile test. ?(Really it
> could probably be eliminated completely and PIE support hardwired to
> be on; this is just a more conservative patch, and only fairly limited
> cleanups are made possible through hardwiring PIE support on.) ?If for
> some reason PIE support is problematic for an architecture it's
> certainly better for GCC to diagnose that at compile time rather than
> accept the option and then fail to link. ?But given PIC support, there
> isn't much more involved in PIE support, and part of what is involved
> is bits of statically linked libc code being suitable for linking into
> PIEs - something that of course is a property of the newly built libc,
> not the old one.
>
> Tested x86_64. ?I am not aware of any systems supported by libc or
> ports that do not support PIEs. ?(EGLIBC has hardwired the answer to
> this test to "yes" for the past five years and I see no sign of Debian
> having needed to revert that for any system.)
>
> 2012-05-28 ?Joseph Myers ?<joseph@codesourcery.com>
>
> ? ? ? ?* configure.in (libc_cv_fpie): Weaken to a compile test using
> ? ? ? ?LIBC_TRY_CC_OPTION.
> ? ? ? ?* configure: Regenerated.
I agree with the rationale and this looks good.
Cheers,
Carlos.