From a49c064e407df3d39776241f2c08b14e6affde1e Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Wed, 22 Aug 2018 11:58:43 +0000 Subject: Move Darwin10 unwinder fix to a crt shim. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc/ * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the Darwin10-specific unwinder-shim. * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove. * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): New to cater for Darwin10 Rosetta. libgcc/ * config/unwind-dw2-fde-darwin.c (_darwin10_Unwind_FindEnclosingFunction): move from here ... * config/darwin10-unwind-find-enc-func.c: … to here. * config/t-darwin: Build Darwin10 unwinder shim crt. * libgcc/config.host: Add the Darwin10 unwinder shim. From-SVN: r263765 --- gcc/ChangeLog | 17 +++++++++++++---- gcc/config/darwin10.h | 10 ++++++---- gcc/config/darwin12.h | 8 -------- gcc/config/rs6000/darwin.h | 13 +++++++++++++ 4 files changed, 32 insertions(+), 16 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a3c6753..0b8adf5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2018-08-22 Iain Sandoe + * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the + Darwin10-specific unwinder-shim. + * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove. + * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): + New to cater for Darwin10 Rosetta. + +2018-08-22 Iain Sandoe + * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O specific test before the one for HAVE_AS_GOTOFF_IN_DATA. @@ -9,10 +17,11 @@ PR target/81733 PR target/52795 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New. - (dwarf2out_switch_text_section): Generate a local label for the second - function sub-section and apply it as the second FDE start label. - * gcc/final.c (final_scan_insn_1): Emit second FDE label after the second - sub-section start. + (dwarf2out_switch_text_section): Generate a local label for the + second function sub-section and apply it as the second FDE start + label. + * gcc/final.c (final_scan_insn_1): Emit second FDE label after the + second sub-section start. 2018-08-22 Richard Biener diff --git a/gcc/config/darwin10.h b/gcc/config/darwin10.h index d61eb40..df69429 100644 --- a/gcc/config/darwin10.h +++ b/gcc/config/darwin10.h @@ -25,10 +25,12 @@ along with GCC; see the file COPYING3. If not see #undef LINK_GCC_C_SEQUENCE_SPEC #define LINK_GCC_C_SEQUENCE_SPEC \ "%:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) \ - %{!static:%{!static-libgcc: \ - %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \ - %{fno-pic|fno-PIC|fno-pie|fno-PIE|fapple-kext|mkernel|static|mdynamic-no-pic: \ - %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) } %G %{!nolibc:%L}" + %{!static:%{!static-libgcc: \ + %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \ + %{fno-pic|fno-PIC|fno-pie|fno-PIE|fapple-kext|mkernel|static|mdynamic-no-pic: \ + %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) } \ + %{!nostdlib:%:version-compare(>< 10.6 10.7 mmacosx-version-min= -ld10-uwfef.o)} \ + %G %{!nolibc:%L}" #undef DEF_MIN_OSX_VERSION #define DEF_MIN_OSX_VERSION "10.6" diff --git a/gcc/config/darwin12.h b/gcc/config/darwin12.h index e1e1eb0..adc9a78 100644 --- a/gcc/config/darwin12.h +++ b/gcc/config/darwin12.h @@ -18,14 +18,6 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see . */ -#undef LINK_GCC_C_SEQUENCE_SPEC -#define LINK_GCC_C_SEQUENCE_SPEC \ -"%:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) \ - %{!static:%{!static-libgcc: \ - %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \ - %{fno-pic|fno-PIC|fno-pie|fno-PIE|fapple-kext|mkernel|static|mdynamic-no-pic: \ - %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) } %G %{!nolibc:%L}" - #undef DEF_MIN_OSX_VERSION #define DEF_MIN_OSX_VERSION "10.8" diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index cea1aa9..6b0f18e 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -119,6 +119,13 @@ extern int darwin_emit_branch_islands; mcpu=G5:ppc970; \ :ppc}}" +/* We need to jam the crt to 10.5 for 10.6 (Rosetta) use. */ +#undef DARWIN_CRT1_SPEC +#define DARWIN_CRT1_SPEC \ + "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \ + %:version-compare(>< 10.5 10.7 mmacosx-version-min= -lcrt1.10.5.o) \ + %{fgnu-tm: -lcrttms.o}" + /* crt2.o is at least partially required for 10.3.x and earlier. */ #define DARWIN_CRT2_SPEC \ "%{!m64:%:version-compare(!> 10.4 mmacosx-version-min= crt2.o%s)}" @@ -130,6 +137,12 @@ extern int darwin_emit_branch_islands; { "darwin_crt2", DARWIN_CRT2_SPEC }, \ { "darwin_subarch", DARWIN_SUBARCH_SPEC }, +/* We need to jam the dylib crt to 10.5 for 10.6 (Rosetta) use. */ +#undef DARWIN_DYLIB1_SPEC +#define DARWIN_DYLIB1_SPEC \ + "%:version-compare(!> 10.5 mmacosx-version-min= -ldylib1.o) \ + %:version-compare(>< 10.5 10.7 mmacosx-version-min= -ldylib1.10.5.o)" + /* Output a .machine directive. */ #undef TARGET_ASM_FILE_START #define TARGET_ASM_FILE_START rs6000_darwin_file_start -- cgit v1.1