mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
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 <iain@codesourcery.com> From-SVN: r221967
This commit is contained in:
parent
c620a1686f
commit
cacf1f5906
@ -1,3 +1,12 @@
|
||||
2015-04-10 Jakub Jelinek <jakub@redhat.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
PR target/65351
|
||||
* 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.
|
||||
|
||||
2015-04-07 Jakub Jelinek <jakub@redhat.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
|
@ -1,18 +1,29 @@
|
||||
# The -mdynamic-no-pic ensures that the compiler executable is built without
|
||||
# position-independent-code -- the usual default on Darwin. This fix speeds
|
||||
# compiles by 3-5%.
|
||||
BOOT_CFLAGS += \
|
||||
# compiles by 3-5%. Don't add it if the compiler doesn't also support
|
||||
# -mno-dynamic-no-pic to undo it.
|
||||
DARWIN_MDYNAMIC_NO_PIC := \
|
||||
`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
|
||||
echo -mdynamic-no-pic ;; esac;`
|
||||
$(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null \
|
||||
&& echo -mdynamic-no-pic ;; esac`
|
||||
DARWIN_GCC_MDYNAMIC_NO_PIC := \
|
||||
`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
|
||||
$(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null \
|
||||
|| echo -mdynamic-no-pic ;; esac`
|
||||
|
||||
# ld on Darwin versions >= 10.7 defaults to PIE executables. Disable this for
|
||||
# gcc components, since it is incompatible with our pch implementation.
|
||||
BOOT_LDFLAGS += \
|
||||
`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
|
||||
DARWIN_NO_PIE := `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
|
||||
|
||||
BOOT_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
|
||||
BOOT_LDFLAGS += $(DARWIN_NO_PIE)
|
||||
|
||||
# Similarly, for cross-compilation.
|
||||
STAGE1_CFLAGS += \
|
||||
`case ${host} in i?86-*-darwin* | powerpc-*-darwin*)\
|
||||
echo -mdynamic-no-pic ;; esac;`
|
||||
STAGE1_LDFLAGS += \
|
||||
`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
|
||||
STAGE1_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
|
||||
STAGE1_LDFLAGS += $(DARWIN_NO_PIE)
|
||||
|
||||
# Without -mno-dynamic-no-pic support, add -mdynamic-no-pic just to later
|
||||
# stages when we know it is built with gcc.
|
||||
STAGE2_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
|
||||
STAGE3_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
|
||||
STAGE4_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
|
||||
|
@ -7,11 +7,15 @@ AC_DEFUN([_GCC_PICFLAG], [
|
||||
case "${$2}" 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.
|
||||
$1='-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*) $1='-fno-common -mno-dynamic-no-pic' ;;
|
||||
*) $1=-fno-common ;;
|
||||
esac
|
||||
;;
|
||||
alpha*-dec-osf5*)
|
||||
# PIC is the default.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2015-04-10 Jakub Jelinek <jakub@redhat.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
PR target/65351
|
||||
* configure: Regenerate.
|
||||
|
||||
2015-04-09 Kirill Yukhin <kirill.yukhin@intel.com>
|
||||
|
||||
PR target/65671
|
||||
|
18
gcc/configure
vendored
18
gcc/configure
vendored
@ -4786,11 +4786,15 @@ esac
|
||||
case "${target}" 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_FOR_TARGET='-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_FOR_TARGET='-fno-common -mno-dynamic-no-pic' ;;
|
||||
*) PICFLAG_FOR_TARGET=-fno-common ;;
|
||||
esac
|
||||
;;
|
||||
alpha*-dec-osf5*)
|
||||
# PIC is the default.
|
||||
@ -18149,7 +18153,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 18152 "configure"
|
||||
#line 18156 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -18255,7 +18259,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 18258 "configure"
|
||||
#line 18262 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -1,3 +1,9 @@
|
||||
2015-04-10 Jakub Jelinek <jakub@redhat.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
PR target/65351
|
||||
* configure: Regenerate.
|
||||
|
||||
2015-04-07 Jakub Jelinek <jakub@redhat.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
|
14
libada/configure
vendored
14
libada/configure
vendored
@ -2824,11 +2824,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.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2015-04-10 Jakub Jelinek <jakub@redhat.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
PR target/65351
|
||||
* configure: Regenerate.
|
||||
|
||||
2015-04-07 Jakub Jelinek <jakub@redhat.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
|
14
libgcc/configure
vendored
14
libgcc/configure
vendored
@ -2303,11 +2303,15 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||
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.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2015-04-10 Jakub Jelinek <jakub@redhat.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
PR target/65351
|
||||
* configure: Regenerate.
|
||||
|
||||
2015-04-07 Jakub Jelinek <jakub@redhat.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
|
14
libiberty/configure
vendored
14
libiberty/configure
vendored
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user