diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c6c0f4a70af..16dda55f8e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,33 @@ +2019-07-23 Iain Sandoe + + PR bootstrap/87030 + * config.gcc (*-*-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. + (x86_64-*-darwin*): Switch to single multilib for Darwin >= 18. + (powerpc-*-darwin*): Use biarch files where needed. + (powerpc64-*-darwin*): Likewise. + * config/i386/darwin.h (REAL_LIBGCC_SPEC): Move to new biarch file. + (DARWIN_ARCH_SPEC, DARWIN_SUBARCH_SPEC): Revise for default single + arch case. + * config/i386/darwin32-biarch.h: New. + * config/i386/darwin64.h: Rename. + * gcc/config/i386/darwin64-biarch.h: To this. + * config/i386/t-darwin: Rename. + * gcc/config/i386/t-darwin32-biarch: To this. + * config/i386/t-darwin64: Rename. + * gcc/config/i386/t-darwin64-biarch: To this. + * config/rs6000/darwin32-biarch.h: New. + * config/rs6000/darwin64.h: Rename. + * config/rs6000/darwin64-biarch.h: To this. + (DARWIN_ARCH_SPEC, DARWIN_SUBARCH_SPEC): Revise for default single + arch case. + * config/rs6000/t-darwin8: Rename. + * config/rs6000/t-darwin32-biarch: To this. + * config/rs6000/t-darwin64 Rename. + * config/rs6000/t-darwin64-biarch: To this. + 2019-07-23 Martin Sebor * configure.ac (ACX_PROG_CXX_WARNING_OPTS): Revert r273311. diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index 93bd5588b88..fea3f738543 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -139,9 +139,6 @@ along with GCC; see the file COPYING3. If not see " ASM_OPTIONS " -force_cpusubtype_ALL \ %{static}" ASM_MMACOSX_VERSION_MIN_SPEC -#define DARWIN_ARCH_SPEC "%{m64:x86_64;:i386}" -#define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC - #undef ENDFILE_SPEC #define ENDFILE_SPEC \ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ @@ -149,12 +146,15 @@ along with GCC; see the file COPYING3. If not see %{mpc64:crtprec64.o%s} \ %{mpc80:crtprec80.o%s}" TM_DESTRUCTOR +#define DARWIN_ARCH_SPEC "x86_64" + +/* We default to x86_64 for single-arch builds, bi-arch overrides. */ #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ DARWIN_EXTRA_SPECS \ - { "darwin_arch", DARWIN_ARCH_SPEC }, \ + { "darwin_arch", DARWIN_ARCH_SPEC }, \ { "darwin_crt2", "" }, \ - { "darwin_subarch", DARWIN_SUBARCH_SPEC }, + { "darwin_subarch", DARWIN_ARCH_SPEC }, /* The Darwin assembler mostly follows AT&T syntax. */ #undef ASSEMBLER_DIALECT diff --git a/gcc/config/i386/darwin32-biarch.h b/gcc/config/i386/darwin32-biarch.h new file mode 100644 index 00000000000..b7f53bf2c82 --- /dev/null +++ b/gcc/config/i386/darwin32-biarch.h @@ -0,0 +1,32 @@ +/* Target definitions for i386 running Darwin. + Copyright (C) 2019 Free Software Foundation, Inc. + Contributed by Apple Computer Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#undef DARWIN_ARCH_SPEC +#define DARWIN_ARCH_SPEC "%{m64:x86_64;:i386}" + +#undef DARWIN_SUBARCH_SPEC +#define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC + +#undef SUBTARGET_EXTRA_SPECS +#define SUBTARGET_EXTRA_SPECS \ + DARWIN_EXTRA_SPECS \ + { "darwin_arch", DARWIN_ARCH_SPEC }, \ + { "darwin_crt2", "" }, \ + { "darwin_subarch", DARWIN_SUBARCH_SPEC }, diff --git a/gcc/config/i386/darwin64.h b/gcc/config/i386/darwin64-biarch.h similarity index 100% rename from gcc/config/i386/darwin64.h rename to gcc/config/i386/darwin64-biarch.h diff --git a/gcc/config/i386/t-darwin b/gcc/config/i386/t-darwin32-biarch similarity index 100% rename from gcc/config/i386/t-darwin rename to gcc/config/i386/t-darwin32-biarch diff --git a/gcc/config/i386/t-darwin64 b/gcc/config/i386/t-darwin64-biarch similarity index 100% rename from gcc/config/i386/t-darwin64 rename to gcc/config/i386/t-darwin64-biarch diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index 1bfb577750e..ee442369617 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -117,11 +117,10 @@ extern int darwin_emit_picsym_stub; %. */ + +#undef DARWIN_ARCH_SPEC +#define DARWIN_ARCH_SPEC "%{m64:ppc64;:ppc}" + +#undef DARWIN_SUBARCH_SPEC +#define DARWIN_SUBARCH_SPEC " \ + %{m64: ppc64} \ + %{!m64: \ + %{mcpu=601:ppc601; \ + mcpu=603:ppc603; \ + mcpu=603e:ppc603; \ + mcpu=604:ppc604; \ + mcpu=604e:ppc604e; \ + mcpu=740:ppc750; \ + mcpu=750:ppc750; \ + mcpu=G3:ppc750; \ + mcpu=7400:ppc7400; \ + mcpu=G4:ppc7400; \ + mcpu=7450:ppc7450; \ + mcpu=970:ppc970; \ + mcpu=power4:ppc970; \ + mcpu=G5:ppc970; \ + :ppc}}" + +#undef SUBTARGET_EXTRA_SPECS +#define SUBTARGET_EXTRA_SPECS \ + DARWIN_EXTRA_SPECS \ + { "darwin_arch", DARWIN_ARCH_SPEC }, \ + { "darwin_crt2", DARWIN_CRT2_SPEC }, \ + { "darwin_subarch", DARWIN_SUBARCH_SPEC }, diff --git a/gcc/config/rs6000/darwin64.h b/gcc/config/rs6000/darwin64-biarch.h similarity index 74% rename from gcc/config/rs6000/darwin64.h rename to gcc/config/rs6000/darwin64-biarch.h index a131ff20bbd..9f72524c7e5 100644 --- a/gcc/config/rs6000/darwin64.h +++ b/gcc/config/rs6000/darwin64-biarch.h @@ -1,4 +1,4 @@ -/* Target definitions for PowerPC running Darwin (Mac OS X). +/* Target definitions for PowerPC64 running Darwin (Mac OS X). Copyright (C) 2006-2019 Free Software Foundation, Inc. Contributed by Apple Computer Inc. @@ -25,8 +25,13 @@ #undef DARWIN_ARCH_SPEC #define DARWIN_ARCH_SPEC "%{m32:ppc;:ppc64}" +/* Actually, there's really only 970 as an active option. */ #undef DARWIN_SUBARCH_SPEC #define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC -#undef DARWIN_CRT2_SPEC -#define DARWIN_CRT2_SPEC "" +#undef SUBTARGET_EXTRA_SPECS +#define SUBTARGET_EXTRA_SPECS \ + DARWIN_EXTRA_SPECS \ + { "darwin_arch", DARWIN_ARCH_SPEC }, \ + { "darwin_crt2", "" }, \ + { "darwin_subarch", DARWIN_SUBARCH_SPEC }, diff --git a/gcc/config/rs6000/t-darwin8 b/gcc/config/rs6000/t-darwin32-biarch similarity index 100% rename from gcc/config/rs6000/t-darwin8 rename to gcc/config/rs6000/t-darwin32-biarch diff --git a/gcc/config/rs6000/t-darwin64 b/gcc/config/rs6000/t-darwin64-biarch similarity index 100% rename from gcc/config/rs6000/t-darwin64 rename to gcc/config/rs6000/t-darwin64-biarch