Skip to content
Snippets Groups Projects
Commit 516adb7c authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Default to building for the current macOS version, fix 3rdp

Now if you don't specify MIN_MAC_OSX_VERSION, it will use the
"current" version of macOS as the target.  "Current" is defined as
X.0 where the major version (X) is greater than 10 and X.Y when
major version is 10.

This allows building for a specific target, but uses the newest
libraries if you don't specify.
parent 004b1b10
No related branches found
No related tags found
No related merge requests found
Pipeline #6177 failed
......@@ -34,7 +34,7 @@ ifneq ($(os),linux)
endif
endif
ifeq ($(os),darwin)
JS_CONFIGURE_ARGS += '--enable-macos-target=12.0'
JS_CONFIGURE_ARGS += '--enable-macos-target=${MIN_MAC_OSX_VERSION}'
endif
# Blacklist some machines...
......@@ -167,6 +167,7 @@ $(CRYPTLIB_BUILD): $(3RDP_ROOT)/dist/cryptlib.zip $(3RDP_ROOT)/build/cl-fix-test
$(QUIET)patch -b -p0 -d $(CRYPT_SRC) < cl-channel-select-both.patch
$(QUIET)patch -b -p0 -d $(CRYPT_SRC) < cl-allow-none-auth-svr.patch
$(QUIET)perl -pi.bak -e 's/^(#define CRYPTLIB_VERSION.*)$$/"$$1\n#define CRYPTLIB_PATCHES \"" . (chomp($$val = `cat cl-*.patch | if (which md5sum > \/dev\/null 2>&1); then md5sum; else md5; fi`), $$val) . "\""/e' $(CRYPT_SRC)/cryptlib.h
$(QUIET)sed -E -I orig 's/%%MIN_MAC_OSX_VERSION%%/${MIN_MAC_OSX_VERSION}/g' $(CRYPT_SRC)/tools/ccopts.sh
ifeq ($(os),win32)
$(QUIET)cd $(CRYPT_SRC) && env - PATH="$(PATH)" CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" make directories
$(QUIET)cd $(CRYPT_SRC) && env - PATH="$(PATH)" CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)" make toolscripts
......
......@@ -5,7 +5,7 @@
case $OSNAME in
'Darwin')
- CCARGS="$CCARGS -fPIC -fno-common" ;;
+ CCARGS="$CCARGS -fPIC -fno-common -mmacosx-version-min=12.0" ;;
+ CCARGS="$CCARGS -fPIC -fno-common -mmacosx-version-min=%%MIN_MAC_OSX_VERSION%%" ;;
'CYGWIN_NT-5.0'|'CYGWIN_NT-5.1'|'CYGWIN_NT-6.1')
;;
......@@ -369,7 +369,13 @@ ifeq ($(os),haiku)
CFLAGS += -D__unix__ -DNEEDS_FORKPTY
endif
ifeq ($(os),darwin)
MIN_MAC_OSX_VERSION ?= 12.0
MAC_MAJOR_VER = $(shell sw_vers --productVersion | cut -f 1 -d.)
MAC_MINOR_VER = $(shell sw_vers --productVersion | cut -f 2 -d.)
ifeq ($(MAC_MAJOR_VER),10)
MIN_MAC_OSX_VERSION ?= $(MAC_MAJOR_VER).$(MAC_MINOR_VER)
else
MIN_MAC_OSX_VERSION ?= $(MAC_MAJOR_VER).0
endif
CFLAGS += -D__unix__ -fno-common -D__DARWIN__
CFLAGS += -mmacosx-version-min=$(MIN_MAC_OSX_VERSION)
LDFLAGS += -mmacosx-version-min=$(MIN_MAC_OSX_VERSION)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment