179c7ef523
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
59 lines
1.9 KiB
Plaintext
59 lines
1.9 KiB
Plaintext
|
|
crt2.o: $(srcdir)/config/rs6000/darwin-crt2.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.
|
|
|
|
PPC_ENDFILE_SRC = \
|
|
$(srcdir)/config/rs6000/darwin-gpsave.S \
|
|
$(srcdir)/config/rs6000/darwin-fpsave.S \
|
|
$(srcdir)/config/rs6000/darwin-vecsave.S
|
|
|
|
PPC_ENDFILE_OBJS = \
|
|
darwin-gpsave.o \
|
|
darwin-fpsave.o \
|
|
darwin-vecsave.o
|
|
|
|
darwin-gpsave.o: $(srcdir)/config/rs6000/darwin-gpsave.S
|
|
$(crt_compile) -mmacosx-version-min=10.1 -c $<
|
|
|
|
darwin-fpsave.o: $(srcdir)/config/rs6000/darwin-fpsave.S
|
|
$(crt_compile) -mmacosx-version-min=10.1 -c $<
|
|
|
|
darwin-vecsave.o: $(srcdir)/config/rs6000/darwin-vecsave.S
|
|
$(crt_compile) -mmacosx-version-min=10.1 -c $<
|
|
|
|
# We build these into a library, so that they are only linked as needed and not
|
|
# forced into every object.
|
|
|
|
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
|
|
|
|
# The .S files above are designed to run on all processors, even though
|
|
# they use AltiVec instructions.
|
|
# -Wa is used because -force_cpusubtype_ALL doesn't work with -dynamiclib.
|
|
|
|
HOST_LIBGCC2_CFLAGS += -Wa,-force_cpusubtype_ALL
|
|
|
|
# Although the default for 10.4 is G3, we need the unwinder to be built
|
|
# with vector support so that the "save/rest_world" outlined functions are
|
|
# correctly invoked.
|
|
unwind-dw2_s.o: HOST_LIBGCC2_CFLAGS += -maltivec
|
|
unwind-dw2.o: HOST_LIBGCC2_CFLAGS += -maltivec
|
|
|
|
LIB2ADDEH += $(srcdir)/config/rs6000/darwin-fallback.c
|