aboutsummaryrefslogtreecommitdiff
path: root/gcc/errors.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-06-13 18:53:05 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-06-13 18:53:05 +0000
commit351ac9c582a8b73e8783618c369f25bbbb24eac9 (patch)
tree4efe29fe5d9054476d319e42c3d9b2e812932187 /gcc/errors.c
parentb00802f5e09f2765d299c2a54c30cd372e0013ee (diff)
downloadgcc-351ac9c582a8b73e8783618c369f25bbbb24eac9.zip
gcc-351ac9c582a8b73e8783618c369f25bbbb24eac9.tar.gz
gcc-351ac9c582a8b73e8783618c369f25bbbb24eac9.tar.bz2
Darwin, Driver - Improve processing of macosx-version-min=
For PR target/63810 some improvements were made in the parsing of the version string at the point it's used to define the built-in __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__. This is fine, but the specs processing also uses the version, and specs version-compare doesn't like leading zeros on components. This means that while we succeed in processing -mmacosx-version-min=010.00002.000099 on compile lines, it fails for any other line that uses the value as part of a spec (in particular, link lines fail). To fix this, we need to apply a bit of clean-up to the version that's presented to the driver, and push that back into the command line opts. The value can come from four places: 1. User-entered on the command line 2. User-entered as MACOSX_DEPLOYMENT_TARGET= environment var. 3. Absent those two 3a For self-hosting systems, look-up from the kernel 3b For cross-compilers, as a default supplied at configure time. We apply the clean-up to all 4 (although it shouldn't really be needed for the cases under 3). We also supply a test-case that adapts to the target-version of the system, so that the link requirements are met by the SDK in use (if you try to link i686-darwin9 on an x86-64-darwin18 SDK, it will fail). gcc/ 2019-06-13 Iain Sandoe <iain@sandoe.co.uk> * config/darwin-driver.c (validate_macosx_version_min): New. (darwin_default_min_version): Cleanup and validate supplied version. (darwin_driver_init): Likewise and push cleaned version into opts. gcc/testsuite/ 2019-06-13 Iain Sandoe <iain@sandoe.co.uk> * gcc.dg/darwin-minversion-link.c: New test. From-SVN: r272260
Diffstat (limited to 'gcc/errors.c')
0 files changed, 0 insertions, 0 deletions