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:
parent
bc25b80c0f
commit
387597a4a4
|
@ -85,8 +85,8 @@ def configure(env):
|
||||||
|
|
||||||
if env["arch"] == "arm64":
|
if env["arch"] == "arm64":
|
||||||
print("Building for macOS 10.15+, platform 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(CCFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15"])
|
||||||
env.Append(LINKFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15", "-target", "arm64-apple-macos10.15"])
|
env.Append(LINKFLAGS=["-arch", "arm64", "-mmacosx-version-min=10.15"])
|
||||||
else:
|
else:
|
||||||
print("Building for macOS 10.9+, platform x86-64.")
|
print("Building for macOS 10.9+, platform x86-64.")
|
||||||
env.Append(CCFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.9"])
|
env.Append(CCFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.9"])
|
||||||
|
|
Loading…
Reference in New Issue