]> gitweb.factorcode.org Git - factor.git/commitdiff
make: Use the MacOSX 10.13 SDK for x86 support.
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 22 Mar 2019 05:07:38 +0000 (00:07 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 22 Mar 2019 05:09:06 +0000 (00:09 -0500)
Bugfix - CFLAGS += instead of CFLAGS = because it would get overwritten otherwise.

Also allow overwriting of XCODE_PATH for non-standard path.

Download the 10.13 SDK from
https://github.com/phracker/MacOSX-SDKs/releases

```bash
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.13.sdk.tar.xz
xz --uncompress MacOSX10.13.sdk.tar.xz
tar xvf MacOSX10.13.sdk.tar
mv MacOSX10.13.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
```

GNUmakefile
vm/Config.macosx.x86.32

index 2a779b485562ab534c4d9c073bb78f7ef4f5ac21..1f43b333bb99d4a26a8bda2ba8a533b8f35afbbc 100644 (file)
@@ -13,9 +13,11 @@ ifdef CONFIG
                CXX=$(SHELL_CXX)
        endif
 
+       XCODE_PATH ?= /Applications/Xcode.app
+
        include $(CONFIG)
 
-       CFLAGS = -Wall \
+       CFLAGS += -Wall \
                -pedantic \
                -DFACTOR_VERSION="$(VERSION)" \
                -DFACTOR_GIT_LABEL="$(GIT_LABEL)" \
index 5c0d4e0edef0c3317d2fd4c4c63e2c495c86791d..68eaa9c0d1c49b1ff33d83861e305fdd9a735251 100644 (file)
@@ -1,2 +1,6 @@
 include vm/Config.macosx
 include vm/Config.x86.32
+
+# The last SDK to support x86
+CFLAGS += --sysroot=$(XCODE_PATH)/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
+CXXFLAGS += --sysroot=$(XCODE_PATH)/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk