[Darwin] Fix PR87030 add missed commit hunks.
authorIain Sandoe <iain@sandoe.co.uk>
Tue, 23 Jul 2019 23:20:31 +0000 (23:20 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Tue, 23 Jul 2019 23:20:31 +0000 (23:20 +0000)
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  <iain@sandoe.co.uk>

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

gcc/ChangeLog
gcc/config.gcc
gcc/config/i386/darwin.h
gcc/config/i386/darwin32-biarch.h
gcc/config/i386/darwin64-biarch.h
gcc/config/rs6000/darwin32-biarch.h
gcc/config/rs6000/darwin64-biarch.h

index 16dda55f8e10dd9a2653e99ba262f0c3f0029213..7da7cdbaa6e8952e1ec9de670008ce4751be2a53 100644 (file)
@@ -1,3 +1,17 @@
+2019-07-24  Iain Sandoe  <iain@sandoe.co.uk>
+
+       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  <iain@sandoe.co.uk>
 
        PR bootstrap/87030
index 58262e5b861719644675d552f8ff5adb0f10ee6c..e55c67a4248f596a2756b87f8466e594be216b11 100644 (file)
@@ -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"
index fea3f738543524c28b9089b4c02f88496d805f1d..d9c8f200b9c41dc906c0aa17d0539455f92ce139 100644 (file)
@@ -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))
 
index b7f53bf2c824982a89507b555a808f424ca12311..8dcc4a3b0b39653ce627e26ed4b1ff9a5c19e939 100644 (file)
@@ -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
 
index ebd65f94208531e519b5d2d3746516f8e56c02e5..5af7665c2a7bb9c1edca0f0eb39fbd7c0f218b7b 100644 (file)
@@ -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.
 
index 35ea0752c877c8bcbfea2e45599f1ee0d2dc11bf..743aabfcea22cdd671497e36a8ecad6efd5c5f50 100644 (file)
@@ -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.
 
index 9f72524c7e52f7843167558dcd5eebc86bf2eab4..4f789544b9ec42b8f40fc2df78f768f3011115ac 100644 (file)
@@ -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.