From: Iain Sandoe Date: Tue, 23 Jul 2019 23:20:31 +0000 (+0000) Subject: [Darwin] Fix PR87030 add missed commit hunks. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2ff710457a1f3db86722f86767cb87fea4ea25e;p=gcc.git [Darwin] Fix PR87030 add missed commit hunks. Messed up the commit, and missed changes to gcc/config.gcc and to the comments in some of the headers. 2019-07-24 Iain Sandoe gcc/ PR bootstrap/87030 * config/i386/darwin.h (REAL_LIBGCC_SPEC): Move from here... * config/i386/darwin32-biarch.h .. to here. * config/i386/darwin64-biarch.h: Adjust comments. * config/rs6000/darwin32-biarch.h: Likewise. * config/rs6000/darwin64-biarch.h: Likewise. * config.gcc: Missed commit from r273746 (*-*-darwin*): Don't include CPU t-darwin here. (i[34567]86-*-darwin*): Adjust to use biarch files. Produce an error message if i686-darwin configuration is attempted for Darwin >= 18. From-SVN: r273749 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 16dda55f8e1..7da7cdbaa6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2019-07-24 Iain Sandoe + + PR bootstrap/87030 + * config/i386/darwin.h (REAL_LIBGCC_SPEC): Move from here... + * config/i386/darwin32-biarch.h .. to here. + * config/i386/darwin64-biarch.h: Adjust comments. + * config/rs6000/darwin32-biarch.h: Likewise. + * config/rs6000/darwin64-biarch.h: Likewise. + * config.gcc: Missed commit from r273746 + (*-*-darwin*): Don't include CPU t-darwin here. + (i[34567]86-*-darwin*): Adjust to use biarch files. Produce + an error message if i686-darwin configuration is attempted for + Darwin >= 18. + 2019-07-23 Iain Sandoe PR bootstrap/87030 diff --git a/gcc/config.gcc b/gcc/config.gcc index 58262e5b861..e55c67a4248 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -673,7 +673,7 @@ x86_cpus="generic intel" # Common parts for widely ported systems. case ${target} in *-*-darwin*) - tmake_file="t-darwin ${cpu_type}/t-darwin" + tmake_file="t-darwin " tm_file="${tm_file} darwin.h" case ${target} in *-*-darwin9*) @@ -1645,16 +1645,25 @@ hppa[12]*-*-hpux11*) dwarf2=no fi ;; +i[34567]86-*-darwin1[89]*) + echo "Error: 32bit target is not supported after Darwin17" 1>&2 + ;; i[34567]86-*-darwin*) need_64bit_isa=yes # Baseline choice for a machine that allows m64 support. with_cpu=${with_cpu:-core2} + tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch t-slibgcc" + tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h" + ;; +x86_64-*-darwin1[89]* | x86_64-*-darwin2[01]*) + # Only 64b from now + with_cpu=${with_cpu:-core2} tmake_file="${tmake_file} t-slibgcc" ;; x86_64-*-darwin*) with_cpu=${with_cpu:-core2} - tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc" - tm_file="${tm_file} ${cpu_type}/darwin64.h" + tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc" + tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h" ;; i[34567]86-*-elfiamcu) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h" @@ -2616,24 +2625,31 @@ pdp11-*-*) # extra_headers= # ;; powerpc-*-darwin*) - extra_options="${extra_options} rs6000/darwin.opt" + extra_options="${extra_options} ${cpu_type}/darwin.opt" case ${target} in - *-darwin1[0-9]* | *-darwin[8-9]*) - tmake_file="${tmake_file} rs6000/t-darwin8" - tm_file="${tm_file} rs6000/darwin8.h" + *-darwin1[0-9]* | *-darwin9*) + tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch" + tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h" + ;; + *-darwin8*) + tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch" + tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h" + tm_file="${tm_file} ${cpu_type}/darwin8.h" ;; *-darwin7*) - tm_file="${tm_file} rs6000/darwin7.h" + tm_file="${tm_file} ${cpu_type}/darwin7.h" ;; - *-darwin[0-6]*) + *-darwin[456]*) + # Earlier - ingle arch, with 32b only + # OS X 10.0, the first edition is Darwin4 ;; esac tmake_file="${tmake_file} t-slibgcc" ;; powerpc64-*-darwin*) extra_options="${extra_options} ${cpu_type}/darwin.opt" - tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc" - tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h" + tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc" + tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h" ;; powerpc*-*-freebsd*) tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h" diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index fea3f738543..d9c8f200b9c 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -39,32 +39,6 @@ along with GCC; see the file COPYING3. If not see #endif #endif -/* WORKAROUND pr80556: - For x86_64 Darwin10 and later, the unwinder is in libunwind (redirected - from libSystem). This doesn't use the keymgr (see keymgr.c) and therefore - the calls that libgcc makes to obtain the KEYMGR_GCC3_DW2_OBJ_LIST are not - updated to include new images, and might not even be valid for a single - image. - Therefore, for 64b exes at least, we must use the libunwind implementation, - even when static-libgcc is specified. We put libSystem first so that - unwinder symbols are satisfied from there. */ -#undef REAL_LIBGCC_SPEC -#define REAL_LIBGCC_SPEC \ - "%{static-libgcc|static: \ - %{m64:%:version-compare(>= 10.6 mmacosx-version-min= -lSystem)} \ - -lgcc_eh -lgcc; \ - shared-libgcc|fexceptions|fgnu-runtime: \ - %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4) \ - %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ - %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \ - %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \ - -lgcc ; \ - :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \ - %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ - %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \ - %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \ - -lgcc }" - /* Size of the Obj-C jump buffer. */ #define OBJC_JBLEN ((TARGET_64BIT) ? ((9 * 2) + 3 + 16) : (18)) diff --git a/gcc/config/i386/darwin32-biarch.h b/gcc/config/i386/darwin32-biarch.h index b7f53bf2c82..8dcc4a3b0b3 100644 --- a/gcc/config/i386/darwin32-biarch.h +++ b/gcc/config/i386/darwin32-biarch.h @@ -1,6 +1,6 @@ -/* Target definitions for i386 running Darwin. +/* Target definitions for i386 running Darwin with a 32b host and supporting + a 64b multilib. Copyright (C) 2019 Free Software Foundation, Inc. - Contributed by Apple Computer Inc. This file is part of GCC. @@ -21,6 +21,32 @@ along with GCC; see the file COPYING3. If not see #undef DARWIN_ARCH_SPEC #define DARWIN_ARCH_SPEC "%{m64:x86_64;:i386}" +/* WORKAROUND pr80556: + For x86_64 Darwin10 and later, the unwinder is in libunwind (redirected + from libSystem). This doesn't use the keymgr (see keymgr.c) and therefore + the calls that libgcc makes to obtain the KEYMGR_GCC3_DW2_OBJ_LIST are not + updated to include new images, and might not even be valid for a single + image. + Therefore, for 64b exes at least, we must use the libunwind implementation, + even when static-libgcc is specified. We put libSystem first so that + unwinder symbols are satisfied from there. */ +#undef REAL_LIBGCC_SPEC +#define REAL_LIBGCC_SPEC \ + "%{static-libgcc|static: \ + %{m64:%:version-compare(>= 10.6 mmacosx-version-min= -lSystem)} \ + -lgcc_eh -lgcc; \ + shared-libgcc|fexceptions|fgnu-runtime: \ + %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ + %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \ + %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \ + -lgcc ; \ + :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ + %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \ + %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \ + -lgcc }" + #undef DARWIN_SUBARCH_SPEC #define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC diff --git a/gcc/config/i386/darwin64-biarch.h b/gcc/config/i386/darwin64-biarch.h index ebd65f94208..5af7665c2a7 100644 --- a/gcc/config/i386/darwin64-biarch.h +++ b/gcc/config/i386/darwin64-biarch.h @@ -1,4 +1,5 @@ -/* Target definitions for x86_64 running Darwin. +/* Target definitions for x86_64 running Darwin with a 64b host supporting a + 32b multilib. Copyright (C) 2006-2019 Free Software Foundation, Inc. Contributed by Apple Computer Inc. diff --git a/gcc/config/rs6000/darwin32-biarch.h b/gcc/config/rs6000/darwin32-biarch.h index 35ea0752c87..743aabfcea2 100644 --- a/gcc/config/rs6000/darwin32-biarch.h +++ b/gcc/config/rs6000/darwin32-biarch.h @@ -1,6 +1,6 @@ -/* Target definitions for PowerPC running Darwin (Mac OS X). - Copyright (C) 2006-2019 Free Software Foundation, Inc. - Contributed by Apple Computer Inc. +/* Target definitions for PowerPC running Darwin (Mac OS X) for a 32b host + with a 64b miultilib. + Copyright (C) 2019 Free Software Foundation, Inc. This file is part of GCC. diff --git a/gcc/config/rs6000/darwin64-biarch.h b/gcc/config/rs6000/darwin64-biarch.h index 9f72524c7e5..4f789544b9e 100644 --- a/gcc/config/rs6000/darwin64-biarch.h +++ b/gcc/config/rs6000/darwin64-biarch.h @@ -1,4 +1,5 @@ -/* Target definitions for PowerPC64 running Darwin (Mac OS X). +/* Target definitions for PowerPC64 running Darwin (Mac OS X) for a 64b host + supporting a 32b multilib. Copyright (C) 2006-2019 Free Software Foundation, Inc. Contributed by Apple Computer Inc.