aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/t-darwin
diff options
context:
space:
mode:
authorIain Sandoe <iain@codesourcery.com>2016-11-27 15:07:22 +0000
committerIain Sandoe <iains@gcc.gnu.org>2016-11-27 15:07:22 +0000
commitb410cf1dc056aab195c5408871ffca932df8a78a (patch)
treedc142613e84e7693a450028b7c1073978b9092b4 /libgcc/config/t-darwin
parent03f82a6a634ddfa5828843b647c896968aee3702 (diff)
downloadgcc-b410cf1dc056aab195c5408871ffca932df8a78a.zip
gcc-b410cf1dc056aab195c5408871ffca932df8a78a.tar.gz
gcc-b410cf1dc056aab195c5408871ffca932df8a78a.tar.bz2
[Darwin] fix PR67710 by updating 'as' specs to handle newer assembler versions.
A/ Newer versions of ld64 check the min_version command, and newer versions of the system assembler inserts this in response to "-mmacosx-version-min=" on the assembler line. Unless one makes sensible versions, some object is bound to conflict. B/ Additionally, there's a difference in behaviour between "as" and "ld" when presented with xx.yy.zz (ld truncates to xx.yy, as doesn't); net result is that one needs to pass a truncated version to "as". So (if the assembler supports minversion commands) (a) provide a truncated minversion (as asm_macosx_version_min, which is a driver-only var). (b) pass this to "as" (c) Update tests to determine 'HAVE_AS_MMACOSX_VERSION_MIN_OPTION' (Rainer's patch) (d) For some reason the testcases are "run" (it's not obvious they need to be, they are checking compile-time issues) - anyway, to preserve the status quo, I've left them as exec. However, the minimum version that can be code-gened for is target-dependent (there are no released x86 versions before 10.4, for example). To avoid conflicts where the "as" is assuming some minimum, I've set the testversion to 10.5 (which is supported by all the archs we have) (e) We need to ensure that libgcc and crts are generated with a sufficiently old minversion not to conflict. gcc/ 2016-11-27 Iain Sandoe <iain@codesourcery.com> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR target/67710 * config.in: Regenerate * config/darwin-driver.c (darwin_driver_init): Emit a version string for the assembler. * config/darwin.h(ASM_MMACOSX_VERSION_MIN_SPEC): New, new tests. * config/darwin.opt(asm_macosx_version_min): New. * config/i386/darwin.h: Handle ASM_MMACOSX_VERSION_MIN_SPEC. * configure: Regenerate * configure.ac: Check for mmacosx-version-min handling. gcc/testsuite/ 2016-11-27 Iain Sandoe <iain@codesourcery.com> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Dominique d'Humieres <dominiq@lps.ens.fr> PR target/67710 * gcc.dg/darwin-minversion-1.c: Update min version check. * gcc.dg/darwin-minversion-2.c: Likewise. * gcc.dg/darwin-minversion-3.c: Likewise. libgcc/ 2016-11-27 Iain Sandoe <iain@codesourcery.com> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR target/67710 * config/t-darwin: Default builds to 10.5 codegen. Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr> Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> From-SVN: r242898
Diffstat (limited to 'libgcc/config/t-darwin')
-rw-r--r--libgcc/config/t-darwin4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgcc/config/t-darwin b/libgcc/config/t-darwin
index a69169f..13ca6ed 100644
--- a/libgcc/config/t-darwin
+++ b/libgcc/config/t-darwin
@@ -1,3 +1,7 @@
+# Set this as a minimum (unless overriden by arch t-files) since it's a
+# reasonable lowest common denominator that works for all our archs.
+HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=10.5
+
crt3.o: $(srcdir)/config/darwin-crt3.c
$(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $<