Commit c2ff7104 by Iain Sandoe Committed by Iain Sandoe

[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  <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
parent c078c9f4
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> 2019-07-23 Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/87030 PR bootstrap/87030
......
...@@ -673,7 +673,7 @@ x86_cpus="generic intel" ...@@ -673,7 +673,7 @@ x86_cpus="generic intel"
# Common parts for widely ported systems. # Common parts for widely ported systems.
case ${target} in case ${target} in
*-*-darwin*) *-*-darwin*)
tmake_file="t-darwin ${cpu_type}/t-darwin" tmake_file="t-darwin "
tm_file="${tm_file} darwin.h" tm_file="${tm_file} darwin.h"
case ${target} in case ${target} in
*-*-darwin9*) *-*-darwin9*)
...@@ -1645,16 +1645,25 @@ hppa[12]*-*-hpux11*) ...@@ -1645,16 +1645,25 @@ hppa[12]*-*-hpux11*)
dwarf2=no dwarf2=no
fi fi
;; ;;
i[34567]86-*-darwin1[89]*)
echo "Error: 32bit target is not supported after Darwin17" 1>&2
;;
i[34567]86-*-darwin*) i[34567]86-*-darwin*)
need_64bit_isa=yes need_64bit_isa=yes
# Baseline choice for a machine that allows m64 support. # Baseline choice for a machine that allows m64 support.
with_cpu=${with_cpu:-core2} 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" tmake_file="${tmake_file} t-slibgcc"
;; ;;
x86_64-*-darwin*) x86_64-*-darwin*)
with_cpu=${with_cpu:-core2} with_cpu=${with_cpu:-core2}
tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc" tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc"
tm_file="${tm_file} ${cpu_type}/darwin64.h" tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h"
;; ;;
i[34567]86-*-elfiamcu) i[34567]86-*-elfiamcu)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h" 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-*-*) ...@@ -2616,24 +2625,31 @@ pdp11-*-*)
# extra_headers= # extra_headers=
# ;; # ;;
powerpc-*-darwin*) powerpc-*-darwin*)
extra_options="${extra_options} rs6000/darwin.opt" extra_options="${extra_options} ${cpu_type}/darwin.opt"
case ${target} in case ${target} in
*-darwin1[0-9]* | *-darwin[8-9]*) *-darwin1[0-9]* | *-darwin9*)
tmake_file="${tmake_file} rs6000/t-darwin8" tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
tm_file="${tm_file} rs6000/darwin8.h" 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*) *-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 esac
tmake_file="${tmake_file} t-slibgcc" tmake_file="${tmake_file} t-slibgcc"
;; ;;
powerpc64-*-darwin*) powerpc64-*-darwin*)
extra_options="${extra_options} ${cpu_type}/darwin.opt" extra_options="${extra_options} ${cpu_type}/darwin.opt"
tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc" tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc"
tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h" tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h"
;; ;;
powerpc*-*-freebsd*) powerpc*-*-freebsd*)
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h" tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h"
......
...@@ -39,32 +39,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -39,32 +39,6 @@ along with GCC; see the file COPYING3. If not see
#endif #endif
#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. */ /* Size of the Obj-C jump buffer. */
#define OBJC_JBLEN ((TARGET_64BIT) ? ((9 * 2) + 3 + 16) : (18)) #define OBJC_JBLEN ((TARGET_64BIT) ? ((9 * 2) + 3 + 16) : (18))
......
/* 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. Copyright (C) 2019 Free Software Foundation, Inc.
Contributed by Apple Computer Inc.
This file is part of GCC. This file is part of GCC.
...@@ -21,6 +21,32 @@ along with GCC; see the file COPYING3. If not see ...@@ -21,6 +21,32 @@ along with GCC; see the file COPYING3. If not see
#undef DARWIN_ARCH_SPEC #undef DARWIN_ARCH_SPEC
#define DARWIN_ARCH_SPEC "%{m64:x86_64;:i386}" #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 #undef DARWIN_SUBARCH_SPEC
#define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC #define DARWIN_SUBARCH_SPEC DARWIN_ARCH_SPEC
......
/* 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. Copyright (C) 2006-2019 Free Software Foundation, Inc.
Contributed by Apple Computer Inc. Contributed by Apple Computer Inc.
......
/* Target definitions for PowerPC running Darwin (Mac OS X). /* Target definitions for PowerPC running Darwin (Mac OS X) for a 32b host
Copyright (C) 2006-2019 Free Software Foundation, Inc. with a 64b miultilib.
Contributed by Apple Computer Inc. Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
......
/* 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. Copyright (C) 2006-2019 Free Software Foundation, Inc.
Contributed by Apple Computer Inc. Contributed by Apple Computer Inc.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment