From cacf1f59069873d69005fd274184adc25da3bc90 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 10 Apr 2015 08:43:52 +0200 Subject: re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.) PR target/65351 config/ * mh-darwin: Only apply -mdynamic-no-pic for m32 Darwin when the compiler in use supports -mno-dynamic-no-pic. * picflag.m4: Only append -mno-dynamic-no-pic for Darwin when -mdynamic-no-pic is present in CFLAGS. libiberty/ * configure: Regenerate. libada/ * configure: Regenerate. libgcc/ * configure: Regenerate. gcc/ * configure: Regenerate. Co-Authored-By: Iain Sandoe From-SVN: r221967 --- libiberty/configure | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'libiberty/configure') diff --git a/libiberty/configure b/libiberty/configure index eaed56e..b06cab2 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -4885,11 +4885,15 @@ fi case "${host}" in # PIC is the default on some targets or must not be used. *-*-darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - # Cancel any earlier -mdynamic-no-pic, as that makes - # the code not suitable for shared libraries. - PICFLAG='-fno-common -mno-dynamic-no-pic' + # For darwin, common symbols are not allowed in MH_DYLIB files + case "${CFLAGS}" in + # If we are using a compiler supporting mdynamic-no-pic + # and the option has been tested as safe to add, then cancel + # it here, since the code generated is incompatible with shared + # libs. + *-mdynamic-no-pic*) PICFLAG='-fno-common -mno-dynamic-no-pic' ;; + *) PICFLAG=-fno-common ;; + esac ;; alpha*-dec-osf5*) # PIC is the default. -- cgit v1.1