mirror of https://github.com/BOINC/boinc.git
Mac build scripts: fix args now accepted by patch uility; set mmacosx-version-min, arm64-apple-macos10.10 to 10.13
This commit is contained in:
parent
1bed9a9831
commit
52cc75cbd5
|
@ -35,6 +35,7 @@
|
||||||
# Updated 5/18/21 for compatibility with zsh
|
# Updated 5/18/21 for compatibility with zsh
|
||||||
# Updated 10/18/21 for building c-ares 1.17.2
|
# Updated 10/18/21 for building c-ares 1.17.2
|
||||||
# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
|
# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
|
||||||
|
# Updated 4/5/23 to set mmacosx-version-min, arm64-apple-macos10.10 to 10.13
|
||||||
|
|
||||||
#
|
#
|
||||||
## This script requires OS 10.8 or later
|
## This script requires OS 10.8 or later
|
||||||
|
@ -54,32 +55,6 @@
|
||||||
## use -q or --quiet to redirect build output to /dev/null instead of /dev/stdout
|
## use -q or --quiet to redirect build output to /dev/null instead of /dev/stdout
|
||||||
##
|
##
|
||||||
|
|
||||||
function patch_ares_config() {
|
|
||||||
# Patch src/lib/ares_config.h to not use clock_gettime(), which is
|
|
||||||
# defined in OS 10.12 SDK but was not available before OS 10.12.
|
|
||||||
# If building with an older SDK, this patch will fail because
|
|
||||||
# config has already set our desired value.
|
|
||||||
rm -f src/lib/ares_config.h.orig
|
|
||||||
rm -f /tmp/ares_config_h_diff
|
|
||||||
cat >> /tmp/ares_config_h_diff << ENDOFFILE
|
|
||||||
--- src/lib/ares_config_orig.h 2018-01-25 04:15:37.000000000 -0800
|
|
||||||
+++ src/lib/ares_config.h 2018-02-22 01:30:57.000000000 -0800
|
|
||||||
@@ -74,7 +74,7 @@
|
|
||||||
#define HAVE_BOOL_T 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
|
||||||
-#define HAVE_CLOCK_GETTIME_MONOTONIC 1
|
|
||||||
+/* #undef HAVE_CLOCK_GETTIME_MONOTONIC */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the closesocket function. */
|
|
||||||
/* #undef HAVE_CLOSESOCKET */
|
|
||||||
ENDOFFILE
|
|
||||||
|
|
||||||
patch -bfi /tmp/ares_config_h_diff src/lib/ares_config.h
|
|
||||||
rm -f /tmp/ares_config_h_diff
|
|
||||||
rm -f src/lib/ares_config.h.rej
|
|
||||||
}
|
|
||||||
|
|
||||||
doclean=""
|
doclean=""
|
||||||
stdout_target="/dev/stdout"
|
stdout_target="/dev/stdout"
|
||||||
lprefix="/tmp/installed-c-ares"
|
lprefix="/tmp/installed-c-ares"
|
||||||
|
@ -173,15 +148,13 @@ fi
|
||||||
## there is an unguarded API not available in our Deployment Target. This
|
## there is an unguarded API not available in our Deployment Target. This
|
||||||
## helps ensure c-ares won't try to use unavailable APIs on older Mac
|
## helps ensure c-ares won't try to use unavailable APIs on older Mac
|
||||||
## systems supported by BOINC.
|
## systems supported by BOINC.
|
||||||
## It also causes configure to reject any such APIs for which it tests;
|
## It also causes configure to reject any such APIs for which it tests.
|
||||||
## this actually makes the call to the patch_ares_config function
|
|
||||||
## redundant, but it does no harm to leave it in.
|
|
||||||
#
|
#
|
||||||
export CC="${GCCPATH}";export CXX="${GPPPATH}"
|
export CC="${GCCPATH}";export CXX="${GPPPATH}"
|
||||||
export CPPFLAGS=""
|
export CPPFLAGS=""
|
||||||
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
|
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
|
||||||
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++"
|
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.13 -stdlib=libc++"
|
||||||
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -arch x86_64"
|
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.13 -arch x86_64"
|
||||||
export SDKROOT="${SDKPATH}"
|
export SDKROOT="${SDKPATH}"
|
||||||
export MACOSX_DEPLOYMENT_TARGET=10.13
|
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||||
export MAC_OS_X_VERSION_MAX_ALLOWED=101300
|
export MAC_OS_X_VERSION_MAX_ALLOWED=101300
|
||||||
|
@ -190,7 +163,6 @@ export MAC_OS_X_VERSION_MIN_REQUIRED=101300
|
||||||
./configure --prefix=${lprefix} --enable-shared=NO --host=x86_64
|
./configure --prefix=${lprefix} --enable-shared=NO --host=x86_64
|
||||||
if [ $? -ne 0 ]; then return 1; fi
|
if [ $? -ne 0 ]; then return 1; fi
|
||||||
|
|
||||||
patch_ares_config
|
|
||||||
|
|
||||||
if [ "${doclean}" = "yes" ]; then
|
if [ "${doclean}" = "yes" ]; then
|
||||||
make clean
|
make clean
|
||||||
|
@ -208,8 +180,8 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
|
||||||
export CC="${GCCPATH}";export CXX="${GPPPATH}"
|
export CC="${GCCPATH}";export CXX="${GPPPATH}"
|
||||||
export CPPFLAGS=""
|
export CPPFLAGS=""
|
||||||
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
|
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
|
||||||
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos10.10 -mmacosx-version-min=10.10 -stdlib=libc++"
|
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos10.13 -mmacosx-version-min=10.13 -stdlib=libc++"
|
||||||
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -target arm64-apple-macos10.10"
|
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.13 -target arm64-apple-macos10.13"
|
||||||
export SDKROOT="${SDKPATH}"
|
export SDKROOT="${SDKPATH}"
|
||||||
export MACOSX_DEPLOYMENT_TARGET=10.13
|
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||||
export MAC_OS_X_VERSION_MAX_ALLOWED=101300
|
export MAC_OS_X_VERSION_MAX_ALLOWED=101300
|
||||||
|
@ -222,8 +194,6 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
|
||||||
echo " ******"
|
echo " ******"
|
||||||
else
|
else
|
||||||
|
|
||||||
patch_ares_config
|
|
||||||
|
|
||||||
# save x86_64 header and lib for later use
|
# save x86_64 header and lib for later use
|
||||||
# c-ares configure creates a different ares_build.h file for each architecture
|
# c-ares configure creates a different ares_build.h file for each architecture
|
||||||
# for a sanity check on size of long and socklen_t. But these are identical
|
# for a sanity check on size of long and socklen_t. But these are identical
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
# instead of ca-bundle.crt)
|
# instead of ca-bundle.crt)
|
||||||
# Updated 11/16/21 for curl 7.79.1
|
# Updated 11/16/21 for curl 7.79.1
|
||||||
# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
|
# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
|
||||||
|
# Updated 4/5/23 for args now accepted by patch utility; set mmacosx-version-min=10.13
|
||||||
#
|
#
|
||||||
## Curl's configure and make set the "-Werror=partial-availability" compiler flag,
|
## Curl's configure and make set the "-Werror=partial-availability" compiler flag,
|
||||||
## which generates an error if there is an API not available in our Deployment
|
## which generates an error if there is an API not available in our Deployment
|
||||||
|
@ -88,28 +89,9 @@ function patch_curl_config {
|
||||||
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
||||||
ENDOFFILE
|
ENDOFFILE
|
||||||
|
|
||||||
patch -fi /tmp/curl_config_h_diff1 lib/curl_config.h
|
patch -b -f -i /tmp/curl_config_h_diff1 lib/curl_config.h
|
||||||
rm -f /tmp/curl_config_h_diff1
|
rm -f /tmp/curl_config_h_diff1
|
||||||
rm -f lib/curl_config.h.rej
|
rm -f lib/curl_config.h.rej
|
||||||
|
|
||||||
# Patch curl_config.h to not use clock_gettime(), which is
|
|
||||||
# defined in OS 10.12 SDK but was not available before OS 10.12.
|
|
||||||
rm -f /tmp/curl_config_h_diff2
|
|
||||||
cat >> /tmp/curl_config_h_diff2 << ENDOFFILE
|
|
||||||
--- lib/curl_config.h 2018-02-22 04:21:52.000000000 -0800
|
|
||||||
+++ lib/curl_config2.h.in 2018-02-22 04:30:21.000000000 -0800
|
|
||||||
@@ -171,5 +171,5 @@
|
|
||||||
|
|
||||||
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
|
||||||
-#define HAVE_CLOCK_GETTIME_MONOTONIC 1
|
|
||||||
+/* #undef HAVE_CLOCK_GETTIME_MONOTONIC */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the closesocket function. */
|
|
||||||
ENDOFFILE
|
|
||||||
|
|
||||||
patch -fi /tmp/curl_config_h_diff2 lib/curl_config.h
|
|
||||||
rm -f /tmp/curl_config_h_diff2
|
|
||||||
rm -f lib/curl_config.h.rej
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CURL_DIR=`pwd`
|
CURL_DIR=`pwd`
|
||||||
|
@ -221,9 +203,9 @@ export MAC_OS_X_VERSION_MAX_ALLOWED=101300
|
||||||
export MAC_OS_X_VERSION_MIN_REQUIRED=101300
|
export MAC_OS_X_VERSION_MIN_REQUIRED=101300
|
||||||
|
|
||||||
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
|
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
|
||||||
export CPPFLAGS="-isysroot ${SDKPATH} -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++"
|
export CPPFLAGS="-isysroot ${SDKPATH} -arch x86_64 -mmacosx-version-min=10.13 -stdlib=libc++"
|
||||||
export CXXFLAGS="-isysroot ${SDKPATH} -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++"
|
export CXXFLAGS="-isysroot ${SDKPATH} -arch x86_64 -mmacosx-version-min=10.13 -stdlib=libc++"
|
||||||
export CFLAGS="-isysroot ${SDKPATH} -mmacosx-version-min=10.10 -arch x86_64"
|
export CFLAGS="-isysroot ${SDKPATH} -mmacosx-version-min=10.13 -arch x86_64"
|
||||||
|
|
||||||
if [ "x${lprefix}" != "x" ]; then
|
if [ "x${lprefix}" != "x" ]; then
|
||||||
PKG_CONFIG_PATH="${lprefix}/lib/pkgconfig" ./configure --prefix=${lprefix} --enable-ares --disable-shared --with-secure-transport --without-libidn --without-libidn2 --without-nghttp2 --without-ngtcp2 --without-nghttp3 --without-quiche --host=x86_64-apple-darwin
|
PKG_CONFIG_PATH="${lprefix}/lib/pkgconfig" ./configure --prefix=${lprefix} --enable-ares --disable-shared --with-secure-transport --without-libidn --without-libidn2 --without-nghttp2 --without-ngtcp2 --without-nghttp3 --without-quiche --host=x86_64-apple-darwin
|
||||||
|
@ -273,9 +255,9 @@ fi
|
||||||
if [ $GCC_can_build_arm64 = "yes" ]; then
|
if [ $GCC_can_build_arm64 = "yes" ]; then
|
||||||
|
|
||||||
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
|
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
|
||||||
export CPPFLAGS="-isysroot ${SDKPATH} -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++"
|
export CPPFLAGS="-isysroot ${SDKPATH} -target arm64-apple-macos -mmacosx-version-min=10.13 -stdlib=libc++"
|
||||||
export CXXFLAGS="-isysroot ${SDKPATH} -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++"
|
export CXXFLAGS="-isysroot ${SDKPATH} -target arm64-apple-macos -mmacosx-version-min=10.13 -stdlib=libc++"
|
||||||
export CFLAGS="-isysroot ${SDKPATH} -mmacosx-version-min=10.10 -target arm64-apple-macos"
|
export CFLAGS="-isysroot ${SDKPATH} -mmacosx-version-min=10.13 -target arm64-apple-macos"
|
||||||
|
|
||||||
# c-ares configure creates a different ares_build.h file for each architecture
|
# c-ares configure creates a different ares_build.h file for each architecture
|
||||||
# for a sanity check on size of long and socklen_t. But these are identical for
|
# for a sanity check on size of long and socklen_t. But these are identical for
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
# Updated 5/18/21 for compatibility with zsh
|
# Updated 5/18/21 for compatibility with zsh
|
||||||
# Updated 10/18/21 for building OpenSSL 3.0.0
|
# Updated 10/18/21 for building OpenSSL 3.0.0
|
||||||
# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
|
# Updated 2/6/23 changed MAC_OS_X_VERSION_MAX_ALLOWED to 101300 and MAC_OS_X_VERSION_MIN_REQUIRED to 101300 and MACOSX_DEPLOYMENT_TARGET to 10.13
|
||||||
|
# Updated 4/5/23 for args now accepted by patch utility; set mmacosx-version-min=10.13
|
||||||
#
|
#
|
||||||
## Building OpenSSL 3.0 requires Xcode 10.2 or later
|
## Building OpenSSL 3.0 requires Xcode 10.2 or later
|
||||||
#
|
#
|
||||||
|
@ -192,7 +193,7 @@ if [[ $major -lt 10 || ($major -eq 10 && $minor -lt 2 ) ]]; then
|
||||||
*STDOUT=*OUT;
|
*STDOUT=*OUT;
|
||||||
ENDOFFILE
|
ENDOFFILE
|
||||||
|
|
||||||
patch -bfi /tmp/rsaz-avx512_pl_diff crypto/bn/asm/rsaz-avx512.pl
|
patch -b -f -i /tmp/rsaz-avx512_pl_diff crypto/bn/asm/rsaz-avx512.pl
|
||||||
rm -f /tmp/rsaz-avx512_pl_diff
|
rm -f /tmp/rsaz-avx512_pl_diff
|
||||||
rm -f crypto/bn/asm/rsaz-avx512.pl.rej
|
rm -f crypto/bn/asm/rsaz-avx512.pl.rej
|
||||||
else
|
else
|
||||||
|
@ -208,8 +209,8 @@ echo ""
|
||||||
export CC="${GCCPATH}";export CXX="${GPPPATH}"
|
export CC="${GCCPATH}";export CXX="${GPPPATH}"
|
||||||
export CPPFLAGS=""
|
export CPPFLAGS=""
|
||||||
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
|
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,x86_64"
|
||||||
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.13 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
||||||
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.10 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -arch x86_64 -mmacosx-version-min=10.13 -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
||||||
export SDKROOT="${SDKPATH}"
|
export SDKROOT="${SDKPATH}"
|
||||||
export MACOSX_DEPLOYMENT_TARGET=10.13
|
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||||
export LIBRARY_PATH="${SDKPATH}/usr/lib"
|
export LIBRARY_PATH="${SDKPATH}/usr/lib"
|
||||||
|
@ -235,9 +236,9 @@ if [ $GCC_can_build_arm64 = "yes" ]; then
|
||||||
|
|
||||||
export CC="${GCCPATH}";export CXX="${GPPPATH}"
|
export CC="${GCCPATH}";export CXX="${GPPPATH}"
|
||||||
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
|
export LDFLAGS="-Wl,-syslibroot,${SDKPATH},-arch,arm64"
|
||||||
export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
export CPPFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.13 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
||||||
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.10 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
export CXXFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -target arm64-apple-macos -mmacosx-version-min=10.13 -stdlib=libc++ -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
||||||
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.10 -target arm64-apple-macos -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
export CFLAGS="-isysroot ${SDKPATH} -Werror=unguarded-availability -mmacosx-version-min=10.13 -target arm64-apple-macos -DMAC_OS_X_VERSION_MAX_ALLOWED=101300 -DMAC_OS_X_VERSION_MIN_REQUIRED=101300"
|
||||||
export SDKROOT="${SDKPATH}"
|
export SDKROOT="${SDKPATH}"
|
||||||
export MACOSX_DEPLOYMENT_TARGET=10.13
|
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||||
export LIBRARY_PATH="${SDKPATH}/usr/lib"
|
export LIBRARY_PATH="${SDKPATH}/usr/lib"
|
||||||
|
|
|
@ -49,9 +49,9 @@ curlDirName="curl-7.79.1"
|
||||||
curlFileName="curl-7.79.1.tar.gz"
|
curlFileName="curl-7.79.1.tar.gz"
|
||||||
curlURL="https://curl.se/download/curl-7.79.1.tar.gz"
|
curlURL="https://curl.se/download/curl-7.79.1.tar.gz"
|
||||||
|
|
||||||
wxWidgetsDirName="wxWidgets-3.1.5"
|
wxWidgetsDirName="wxWidgets-3.1.6"
|
||||||
wxWidgetsFileName="wxWidgets-3.1.5.tar.bz2"
|
wxWidgetsFileName="wxWidgets-3.1.6.tar.bz2"
|
||||||
wxWidgetsURL="https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2"
|
wxWidgetsURL="https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.6/wxWidgets-3.1.6.tar.bz2"
|
||||||
|
|
||||||
freetypeDirName="freetype-2.11.0"
|
freetypeDirName="freetype-2.11.0"
|
||||||
freetypeFileName="freetype-2.11.0.tar.gz"
|
freetypeFileName="freetype-2.11.0.tar.gz"
|
||||||
|
|
Loading…
Reference in New Issue