From 9e53a16010da5473c7d8bc66c46cb06001a4af90 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Fri, 1 Nov 2024 15:31:33 +0000 Subject: [PATCH] Upgrade minimum macOS version to 10.15 (Catalina) (#257) Required for C++17, aligned alloc etc. --- build.sh | 2 +- build/lin.sh | 3 --- platforms/darwin-x64/Toolchain.cmake | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 40ec60c3..771eb15a 100755 --- a/build.sh +++ b/build.sh @@ -46,7 +46,7 @@ for flavour in darwin-x64 darwin-arm64v8; do export PKG_CONFIG="$(brew --prefix)/bin/pkg-config --static" # Earliest supported version of macOS - export MACOSX_DEPLOYMENT_TARGET="10.13" + export MACOSX_DEPLOYMENT_TARGET="10.15" # Added -fno-stack-check to workaround a stack misalignment bug on macOS 10.15 # See: diff --git a/build/lin.sh b/build/lin.sh index c01f35cb..691b80fc 100755 --- a/build/lin.sh +++ b/build/lin.sh @@ -203,9 +203,6 @@ fi mkdir ${DEPS}/zlib-ng $CURL https://github.com/zlib-ng/zlib-ng/archive/${VERSION_ZLIB_NG}.tar.gz | tar xzC ${DEPS}/zlib-ng --strip-components=1 cd ${DEPS}/zlib-ng -if [ "$MACOSX_DEPLOYMENT_TARGET" = "10.13" ]; then - sed -i'.bak' "/-DHAVE_ALIGNED_ALLOC/d" CMakeLists.txt -fi CFLAGS="${CFLAGS} -O3" cmake -G"Unix Makefiles" \ -DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=FALSE -DZLIB_COMPAT=TRUE -DWITH_ARMV6=FALSE diff --git a/platforms/darwin-x64/Toolchain.cmake b/platforms/darwin-x64/Toolchain.cmake index 08be8ab0..e1c513f7 100644 --- a/platforms/darwin-x64/Toolchain.cmake +++ b/platforms/darwin-x64/Toolchain.cmake @@ -2,7 +2,7 @@ SET(CMAKE_C_COMPILER clang) SET(CMAKE_CXX_COMPILER clang++) # Earliest supported version of macOS -SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.13) +SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.15) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)