From dbbbb53927652f6ae49a6174eb8f49af5cacd1db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 19 Nov 2020 14:41:47 +0100 Subject: 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`. --- platform/osx/detect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'platform/osx') diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 64e1d94f39..671efa216c 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -87,8 +87,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.12+, platform x86-64.") env.Append(CCFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.12"]) -- cgit v1.2.3