[Darwin] Some TLC for older Darwin versions.
The library handling and some of the options for creating the crts for the older PPC Darwin versions had bit-rotted somewhat. This adjusts the build criteria for the crts to avoid newer ld64 versions warnings about mismatches in build and object versions. Added to some of the comments that it's documented why the specs are as they are. 2019-07-03 Iain Sandoe <iain@sandoe.co.uk> gcc/ * config/darwin.h (REAL_LIBGCC_SPEC): Adjust for earlier Darwin. (STARTFILE_SPEC): Split crt3 into a separate spec. (DARWIN_EXTRA_SPECS): Add crt2 and crt3 spec. (DARWIN_CRT2_SPEC): New. (DARWIN_CRT3_SPEC): New. (MIN_LD64_OMIT_STUBS): Revise to 62.1. * config/rs6000/darwin.h (DARWIN_CRT2_SPEC): Revise conditions. (DARWIN_CRT3_SPEC): New. libgcc/ 2019-07-03 Iain Sandoe <iain@sandoe.co.uk> * config.host (powerpc-*-darwin*,powerpc64-*-darwin*): Revise crt list. * config/rs6000/t-darwin: Build crt3_2 for older systems. Revise mmacosx-version-min for crts to run across all system versions. * config/rs6000/t-darwin64 (LIB2ADD): Remove. * config/t-darwin: Revise mmacosx-version-min for crts to run across system versions >= 10.4. From-SVN: r273016
This commit is contained in:
parent
911c8df0a3
commit
179c7ef523
8 changed files with 105 additions and 54 deletions
|
@ -1,3 +1,13 @@
|
|||
2019-07-03 Iain Sandoe <iain@sandoe.co.uk>
|
||||
|
||||
* config.host (powerpc-*-darwin*,powerpc64-*-darwin*): Revise crt
|
||||
list.
|
||||
* config/rs6000/t-darwin: Build crt3_2 for older systems. Revise
|
||||
mmacosx-version-min for crts to run across all system versions.
|
||||
* config/rs6000/t-darwin64 (LIB2ADD): Remove.
|
||||
* config/t-darwin: Revise mmacosx-version-min for crts to run across
|
||||
system versions >= 10.4.
|
||||
|
||||
2019-07-03 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* Makefile.in: Use topn_values instead of one_value names.
|
||||
|
|
|
@ -1084,18 +1084,20 @@ powerpc-*-darwin*)
|
|||
case ${host} in
|
||||
*-*-darwin9* | *-*-darwin[12][0-9]*)
|
||||
# libSystem contains unwind information for signal frames since
|
||||
# Darwin 9.
|
||||
# Darwin 9. We don't need longcall either.
|
||||
;;
|
||||
*)
|
||||
# prepend the fragment forcing darwin8 codegen.
|
||||
tmake_file="rs6000/t-darwin8 $tmake_file"
|
||||
md_unwind_header=rs6000/darwin-unwind.h
|
||||
;;
|
||||
esac
|
||||
tmake_file="$tmake_file rs6000/t-ibm-ldouble"
|
||||
extra_parts="$extra_parts crt2.o libef_ppc.a"
|
||||
tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble"
|
||||
extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
|
||||
;;
|
||||
powerpc64-*-darwin*)
|
||||
tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble"
|
||||
extra_parts="$extra_parts crt2.o libef_ppc.a"
|
||||
extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
|
||||
;;
|
||||
powerpc*-*-freebsd*)
|
||||
tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-freebsd t-softfp-sfdf t-softfp-excl t-softfp"
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongcall -mmacosx-version-min=10.4
|
||||
|
||||
crt2.o: $(srcdir)/config/rs6000/darwin-crt2.c
|
||||
$(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $<
|
||||
$(crt_compile) -mmacosx-version-min=10.1 -c $<
|
||||
|
||||
# The sources for this indicate that there are some parts that
|
||||
# don't apply >= 10.4
|
||||
crt3_2.o: $(srcdir)/config/darwin-crt3.c
|
||||
$(crt_compile) -mmacosx-version-min=10.1 -c $<
|
||||
|
||||
# The outlined register save/restore functions need to run anywhere, and
|
||||
# they must be leaf functions suitable for use in an endfile.
|
||||
|
@ -32,10 +36,12 @@ libef_ppc.a: $(PPC_ENDFILE_OBJS)
|
|||
$(AR_CREATE_FOR_TARGET) $@ $(PPC_ENDFILE_OBJS)
|
||||
$(RANLIB_FOR_TARGET) $@
|
||||
|
||||
dw_ppc.o: $(srcdir)/config/rs6000/darwin-world.S
|
||||
$(crt_compile) -mmacosx-version-min=10.1 -c $<
|
||||
|
||||
LIB2ADD = $(srcdir)/config/rs6000/darwin-tramp.S \
|
||||
$(srcdir)/config/darwin-64.c \
|
||||
$(srcdir)/config/rs6000/darwin-world.S \
|
||||
$(srcdir)/config/rs6000/ppc64-fp.c
|
||||
$(srcdir)/config/rs6000/darwin-world.S
|
||||
|
||||
# The .S files above are designed to run on all processors, even though
|
||||
# they use AltiVec instructions.
|
||||
|
|
|
@ -1,7 +1 @@
|
|||
LIB2_SIDITI_CONV_FUNCS = yes
|
||||
|
||||
LIB2ADD = $(srcdir)/config/rs6000/darwin-tramp.S \
|
||||
$(srcdir)/config/darwin-64.c \
|
||||
$(srcdir)/config/rs6000/darwin-fpsave.S \
|
||||
$(srcdir)/config/rs6000/darwin-gpsave.S \
|
||||
$(srcdir)/config/rs6000/darwin-world.S
|
||||
|
|
|
@ -3,19 +3,13 @@
|
|||
HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=10.4
|
||||
|
||||
crt3.o: $(srcdir)/config/darwin-crt3.c
|
||||
$(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $<
|
||||
$(crt_compile) -mmacosx-version-min=10.4 -c $<
|
||||
|
||||
crttms.o: $(srcdir)/config/darwin-crt-tm.c
|
||||
$(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -DSTART -c $<
|
||||
$(crt_compile) -mmacosx-version-min=10.4 -DSTART -c $<
|
||||
|
||||
crttme.o: $(srcdir)/config/darwin-crt-tm.c
|
||||
$(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -DEND -c $<
|
||||
|
||||
# -pipe because there's an assembler bug, 4077127, which causes
|
||||
# it to not properly process the first # directive, causing temporary
|
||||
# file names to appear in stabs, causing the bootstrap to fail. Using -pipe
|
||||
# works around this by not having any temporary file names.
|
||||
HOST_LIBGCC2_CFLAGS += -pipe
|
||||
$(crt_compile) -mmacosx-version-min=10.4 -DEND -c $<
|
||||
|
||||
# Use unwind-dw2-fde-darwin
|
||||
LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \
|
||||
|
@ -23,4 +17,4 @@ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \
|
|||
|
||||
# Patch to __Unwind_Find_Enclosing_Function for Darwin10.
|
||||
d10-uwfef.o: $(srcdir)/config/darwin10-unwind-find-enc-func.c
|
||||
$(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -mmacosx-version-min=10.6 -c $<
|
||||
$(crt_compile) -mmacosx-version-min=10.6 -c $<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue