Recent platform linkers will no longer accept linking for a target OS version less than 10.4. Recent SDKs no longer have the libgcc_s shims used for 10.4 and 10.5. So we need to adjust tests that expect these. Added some explanation too.
tested on darwin9, darwin16 and darwin18, applied to mainline, thanks Iain gcc/testsuite/ChangeLog: 2020-01-05 Iain Sandoe <i...@sandoe.co.uk> * gcc.dg/darwin-version-1.c: Adjust test to use different options for Darwin4-9 and Darwin10+. diff --git a/gcc/testsuite/gcc.dg/darwin-version-1.c b/gcc/testsuite/gcc.dg/darwin-version-1.c index 11cfceff39..ad7f7da3b6 100644 --- a/gcc/testsuite/gcc.dg/darwin-version-1.c +++ b/gcc/testsuite/gcc.dg/darwin-version-1.c @@ -1,10 +1,14 @@ /* Basic test of the -mmacosx-version-min option. */ -/* { dg-options "-mmacosx-version-min=10.1" } */ +/* Darwin4 corresponds to MacOS 10.0. */ +/* { dg-options "-mmacosx-version-min=10.1" { target *-*-darwin[456789]* } } */ +/* Later Darwin linkers decline to link for less than Darwin8/MacOS 10.4. + However, we need to make the link for 10.6 because the relevant libgcc_s + shim files for 10.4 and 10.5 are also not installed in later SDKs. */ +/* { dg-options "-mmacosx-version-min=10.6" { target *-*-darwin[123]* } } */ /* { dg-do link { target *-*-darwin* } } */ int main() { return 0; } -