Fix compiling Mac OS 10.5 Universal App Bundle

Need to be able to specify minimum Mac OS X version outside of the
Makefile to avoid conflicting CFLAGS.
Moved -mmacosx-version-min LDFLAGS into the Makefile.
Moved -arch x86_64 from OPTIMIZEVM to CFLAGS to fix linker errors
(previously make-macosx-ub.sh passed it to CFLAGS manually).
This commit is contained in:
Zack Middleton 2017-05-24 14:09:48 -05:00
parent 3b0a862290
commit abce15055c
2 changed files with 25 additions and 17 deletions

View file

@ -409,7 +409,17 @@ ifeq ($(PLATFORM),darwin)
RENDERER_LIBS=
OPTIMIZEVM=
BASE_CFLAGS += -mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070
# Default minimum Mac OS X version
ifeq ($(MACOSX_VERSION_MIN),)
MACOSX_VERSION_MIN=10.7
endif
# Multiply by 100 and then remove decimal. 10.7 -> 1070.0 -> 1070
MAC_OS_X_VERSION_MIN_REQUIRED=$(shell echo '$(MACOSX_VERSION_MIN) * 100' | bc | cut -d. -f1)
LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
BASE_CFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) \
-DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED)
ifeq ($(ARCH),ppc)
BASE_CFLAGS += -arch ppc -faltivec
@ -425,7 +435,8 @@ ifeq ($(PLATFORM),darwin)
BASE_CFLAGS += -arch i386 -m32 -mstackrealign
endif
ifeq ($(ARCH),x86_64)
OPTIMIZEVM += -arch x86_64 -mfpmath=sse
OPTIMIZEVM += -mfpmath=sse
BASE_CFLAGS += -arch x86_64
endif
# When compiling on OSX for OSX, we're not cross compiling as far as the