summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-08-24 09:24:26 +0200
committerGitHub <noreply@github.com>2017-08-24 09:24:26 +0200
commit90c7ee38c6f696eb2c489bef71a8b063f21bf51b (patch)
tree80e40d5f213cc5195ced3dcad64456abcd8cdfbb
parent05a678534433997c71f542ae1b3cecd35abde298 (diff)
parentd7f08ead4e09c106ef9a3c1f9aec9492dfcad683 (diff)
Merge pull request #10585 from Faless/osxcross_fat
Allow building fat binaries with osxcross [ci skip]
-rw-r--r--platform/osx/detect.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index d9891dda61..661da6e7c1 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -65,10 +65,14 @@ def configure(env):
else: # osxcross build
root = os.environ.get("OSXCROSS_ROOT", 0)
- if env["bits"] == "64":
+ if env["bits"] == "fat":
basecmd = root + "/target/bin/x86_64-apple-" + env["osxcross_sdk"] + "-"
- else:
+ env.Append(CCFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
+ env.Append(LINKFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
+ elif env["bits"] == "32":
basecmd = root + "/target/bin/i386-apple-" + env["osxcross_sdk"] + "-"
+ else: # 64-bit, default
+ basecmd = root + "/target/bin/x86_64-apple-" + env["osxcross_sdk"] + "-"
env['CC'] = basecmd + "cc"
env['CXX'] = basecmd + "c++"