Weaken PIE configure test to a compile test
Carlos O'Donell
carlos@systemhalted.org
Tue May 29 02:15:00 GMT 2012
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.
More information about the Libc-alpha
mailing list