aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/darwin-c.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-07-31 21:05:28 +0100
committerIain Sandoe <iain@sandoe.co.uk>2020-11-06 19:33:21 +0000
commit556ab5125912fa2233986eb19d6cd995cf7de1d2 (patch)
treea6a0f9552df92ee5c9a3220a440e57b35e675651 /gcc/config/darwin-c.c
parent600be7f09ea1ea4b59e4e733fda2aca3ba892a6b (diff)
downloadgcc-556ab5125912fa2233986eb19d6cd995cf7de1d2.zip
gcc-556ab5125912fa2233986eb19d6cd995cf7de1d2.tar.gz
gcc-556ab5125912fa2233986eb19d6cd995cf7de1d2.tar.bz2
Darwin: Darwin 20 is to be macOS 11 (Big Sur).
As per Nigel Tufnel's assertion "... this one goes to 11". The various parts of the code that deal with mapping Darwin versions to macOS (X) versions need updating to deal with a major version of 11. So now we have, for example: Darwin 4 => macOS (X) 10.0 … Darwin 14 => macOS (X) 10.10 ... Darwin 19 => macOS (X) 10.15 Darwin 20 => macOS 11.0 Because of the historical duplication of the "10" in macOSX 10.xx and the number of tools that expect this, it is likely that system tools will allow macos11.0 and/or macosx11.0 (despite that the latter makes little sense). Update the link test to cover Catalina (Darwin19/10.15) and Big Sur (Darwin20/11.0). gcc/ChangeLog: * config/darwin-c.c: Allow for Darwin20 to correspond to macOS 11. * config/darwin-driver.c: Likewise. gcc/testsuite/ChangeLog: * gcc.dg/darwin-minversion-link.c: Allow for Darwin19 (macOS 10.15) and Darwin20 (macOS 11.0).
Diffstat (limited to 'gcc/config/darwin-c.c')
-rw-r--r--gcc/config/darwin-c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c
index e3b999e..9034f49 100644
--- a/gcc/config/darwin-c.c
+++ b/gcc/config/darwin-c.c
@@ -692,10 +692,10 @@ macosx_version_as_macro (void)
if (!version_array)
goto fail;
- if (version_array[MAJOR] != 10)
+ if (version_array[MAJOR] < 10 || version_array[MAJOR] > 11)
goto fail;
- if (version_array[MINOR] < 10)
+ if (version_array[MAJOR] == 10 && version_array[MINOR] < 10)
version_macro = version_as_legacy_macro (version_array);
else
version_macro = version_as_modern_macro (version_array);