OSX: Fix linking with osxcross for arm64

For some reason the `-target` option on the `LINKFLAGS` was causing a weird
issue where osxcross' clang wrapper would attempt using the system `/bin/ld`
instead of the osxcross version (which is Apple's `ld64`).

The error message would be:
```
/bin/ld: unrecognized option '-dynamic'
```

Also removed from `CCFLAGS` for consistency, it seems to work fine with only
`-mmacosx-version-min`.

(cherry picked from commit dbbbb53927)
This commit is contained in:
Rémi Verschelde 2020-11-19 14:41:47 +01:00
parent bc25b80c0f
commit 387597a4a4
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 2 deletions

View File

@ -85,8 +85,8 @@ def configure(env):
if env["arch"] == "arm64":
print("Building for macOS 10.15+, platform arm64.")
env.Append(CCFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15", "-target", "arm64-apple-macos10.15"])
env.Append(LINKFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15", "-target", "arm64-apple-macos10.15"])
env.Append(CCFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15"])
env.Append(LINKFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15"])
else:
print("Building for macOS 10.9+, platform x86-64.")
env.Append(CCFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.9"])