Fix macOS build with latest XCode ##build (#15202)

This commit is contained in:
Remco Verhoef 2019-10-08 10:55:31 +02:00 committed by radare
parent fdc3cf8bd8
commit 80511aac77
2 changed files with 13 additions and 0 deletions

12
mk/darwin.mk Normal file
View File

@ -0,0 +1,12 @@
ifeq ($(OSTYPE),darwin)
ARCH=$(shell uname -m)
MACOS_VERSION="10.5"
MACOS_SDK_VERSION="10.5"
XCODE_VERSION=$(shell xcodebuild -version|grep Xcode|grep -o "[\.0-9]\+")
XCODE_VERSION_MAJOR=$(word 1, $(subst ., ,$(XCODE_VERSION)))
ifeq ($(XCODE_VERSION_MAJOR),11)
PARTIALLD+=-arch ${ARCH} -platform_version macos $(MACOS_VERSION) $(MACOS_SDK_VERSION)
endif
endif

View File

@ -5,6 +5,7 @@ include ../libr/config.mk
include ../mk/platform.mk
_INCLUDE_MK_GCC_=
include ../mk/${COMPILER}.mk
include ../mk/darwin.mk
# Build against last capstone release or next
ifeq ($(shell test -d ../.git && echo 1),1)