mirror of git://gcc.gnu.org/git/gcc.git
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>
|
2015-04-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
Iain Sandoe <iain@codesourcery.com>
|
Iain Sandoe <iain@codesourcery.com>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,29 @@
|
||||||
# The -mdynamic-no-pic ensures that the compiler executable is built without
|
# The -mdynamic-no-pic ensures that the compiler executable is built without
|
||||||
# position-independent-code -- the usual default on Darwin. This fix speeds
|
# position-independent-code -- the usual default on Darwin. This fix speeds
|
||||||
# compiles by 3-5%.
|
# compiles by 3-5%. Don't add it if the compiler doesn't also support
|
||||||
BOOT_CFLAGS += \
|
# -mno-dynamic-no-pic to undo it.
|
||||||
|
DARWIN_MDYNAMIC_NO_PIC := \
|
||||||
`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
|
`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
|
# ld on Darwin versions >= 10.7 defaults to PIE executables. Disable this for
|
||||||
# gcc components, since it is incompatible with our pch implementation.
|
# gcc components, since it is incompatible with our pch implementation.
|
||||||
BOOT_LDFLAGS += \
|
DARWIN_NO_PIE := `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
|
||||||
`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.
|
# Similarly, for cross-compilation.
|
||||||
STAGE1_CFLAGS += \
|
STAGE1_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
|
||||||
`case ${host} in i?86-*-darwin* | powerpc-*-darwin*)\
|
STAGE1_LDFLAGS += $(DARWIN_NO_PIE)
|
||||||
echo -mdynamic-no-pic ;; esac;`
|
|
||||||
STAGE1_LDFLAGS += \
|
# Without -mno-dynamic-no-pic support, add -mdynamic-no-pic just to later
|
||||||
`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
|
# 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
|
case "${$2}" in
|
||||||
# PIC is the default on some targets or must not be used.
|
# PIC is the default on some targets or must not be used.
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
# PIC is the default on this platform
|
# For darwin, common symbols are not allowed in MH_DYLIB files
|
||||||
# Common symbols not allowed in MH_DYLIB files
|
case "${CFLAGS}" in
|
||||||
# Cancel any earlier -mdynamic-no-pic, as that makes
|
# If we are using a compiler supporting mdynamic-no-pic
|
||||||
# the code not suitable for shared libraries.
|
# and the option has been tested as safe to add, then cancel
|
||||||
$1='-fno-common -mno-dynamic-no-pic'
|
# 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*)
|
alpha*-dec-osf5*)
|
||||||
# PIC is the default.
|
# 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>
|
2015-04-09 Kirill Yukhin <kirill.yukhin@intel.com>
|
||||||
|
|
||||||
PR target/65671
|
PR target/65671
|
||||||
|
|
|
||||||
|
|
@ -4786,11 +4786,15 @@ esac
|
||||||
case "${target}" in
|
case "${target}" in
|
||||||
# PIC is the default on some targets or must not be used.
|
# PIC is the default on some targets or must not be used.
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
# PIC is the default on this platform
|
# For darwin, common symbols are not allowed in MH_DYLIB files
|
||||||
# Common symbols not allowed in MH_DYLIB files
|
case "${CFLAGS}" in
|
||||||
# Cancel any earlier -mdynamic-no-pic, as that makes
|
# If we are using a compiler supporting mdynamic-no-pic
|
||||||
# the code not suitable for shared libraries.
|
# and the option has been tested as safe to add, then cancel
|
||||||
PICFLAG_FOR_TARGET='-fno-common -mno-dynamic-no-pic'
|
# 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*)
|
alpha*-dec-osf5*)
|
||||||
# PIC is the default.
|
# PIC is the default.
|
||||||
|
|
@ -18149,7 +18153,7 @@ else
|
||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 18152 "configure"
|
#line 18156 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
|
|
@ -18255,7 +18259,7 @@ else
|
||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 18258 "configure"
|
#line 18262 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_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>
|
2015-04-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
Iain Sandoe <iain@codesourcery.com>
|
Iain Sandoe <iain@codesourcery.com>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2824,11 +2824,15 @@ fi
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
# PIC is the default on some targets or must not be used.
|
# PIC is the default on some targets or must not be used.
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
# PIC is the default on this platform
|
# For darwin, common symbols are not allowed in MH_DYLIB files
|
||||||
# Common symbols not allowed in MH_DYLIB files
|
case "${CFLAGS}" in
|
||||||
# Cancel any earlier -mdynamic-no-pic, as that makes
|
# If we are using a compiler supporting mdynamic-no-pic
|
||||||
# the code not suitable for shared libraries.
|
# and the option has been tested as safe to add, then cancel
|
||||||
PICFLAG='-fno-common -mno-dynamic-no-pic'
|
# 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*)
|
alpha*-dec-osf5*)
|
||||||
# PIC is the default.
|
# 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>
|
2015-04-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
Iain Sandoe <iain@codesourcery.com>
|
Iain Sandoe <iain@codesourcery.com>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2303,11 +2303,15 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
# PIC is the default on some targets or must not be used.
|
# PIC is the default on some targets or must not be used.
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
# PIC is the default on this platform
|
# For darwin, common symbols are not allowed in MH_DYLIB files
|
||||||
# Common symbols not allowed in MH_DYLIB files
|
case "${CFLAGS}" in
|
||||||
# Cancel any earlier -mdynamic-no-pic, as that makes
|
# If we are using a compiler supporting mdynamic-no-pic
|
||||||
# the code not suitable for shared libraries.
|
# and the option has been tested as safe to add, then cancel
|
||||||
PICFLAG='-fno-common -mno-dynamic-no-pic'
|
# 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*)
|
alpha*-dec-osf5*)
|
||||||
# PIC is the default.
|
# 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>
|
2015-04-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
Iain Sandoe <iain@codesourcery.com>
|
Iain Sandoe <iain@codesourcery.com>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4885,11 +4885,15 @@ fi
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
# PIC is the default on some targets or must not be used.
|
# PIC is the default on some targets or must not be used.
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
# PIC is the default on this platform
|
# For darwin, common symbols are not allowed in MH_DYLIB files
|
||||||
# Common symbols not allowed in MH_DYLIB files
|
case "${CFLAGS}" in
|
||||||
# Cancel any earlier -mdynamic-no-pic, as that makes
|
# If we are using a compiler supporting mdynamic-no-pic
|
||||||
# the code not suitable for shared libraries.
|
# and the option has been tested as safe to add, then cancel
|
||||||
PICFLAG='-fno-common -mno-dynamic-no-pic'
|
# 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*)
|
alpha*-dec-osf5*)
|
||||||
# PIC is the default.
|
# PIC is the default.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue