Always set MAC_OS_X_VERSION_MAX_ALLOWED = MAC_OS_X_VERSION_MIN_REQUIRED
...and drop the --with-macosx-version-max-allowed configure switch. Looking at the documentation in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/AvailabilityMacros.h, a value of MAC_OS_X_VERSION_MAX_ALLOWED larger than MAC_OS_X_VERSION_MIN_REQUIRED would allow functions that only started to become available in that range to be resolved as null at runtime, so would need our code to be prepared to get null function pointers in such cases, but which our code is presumably not prepared for to begin with, anyway. Change-Id: I1423ee7435aa2b36eb91c62ff91b1fc414995a4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128363 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -425,7 +425,6 @@ export MACOSX_CODESIGNING_IDENTITY=@MACOSX_CODESIGNING_IDENTITY@
|
||||
export MACOSX_DEPLOYMENT_TARGET=@MACOSX_DEPLOYMENT_TARGET@
|
||||
export MACOSX_PACKAGE_SIGNING_IDENTITY=@MACOSX_PACKAGE_SIGNING_IDENTITY@
|
||||
export MACOSX_SDK_PATH=@MACOSX_SDK_PATH@
|
||||
export MAC_OS_X_VERSION_MAX_ALLOWED=@MAC_OS_X_VERSION_MAX_ALLOWED@
|
||||
export MAC_OS_X_VERSION_MIN_REQUIRED=@MAC_OS_X_VERSION_MIN_REQUIRED@
|
||||
export MANDIR=@MANDIR@
|
||||
export MARIADBC_MAJOR=@MARIADBC_MAJOR@
|
||||
|
57
configure.ac
57
configure.ac
@@ -2813,14 +2813,6 @@ AC_ARG_WITH(macosx-version-min-required,
|
||||
],
|
||||
,)
|
||||
|
||||
AC_ARG_WITH(macosx-version-max-allowed,
|
||||
AS_HELP_STRING([--with-macosx-version-max-allowed=<version>],
|
||||
[set the maximum allowed OS version the LibreOffice compilation can use APIs from])
|
||||
[
|
||||
e. g.: --with-macosx-version-max-allowed=11.0
|
||||
],
|
||||
,)
|
||||
|
||||
|
||||
dnl ===================================================================
|
||||
dnl options for stuff used during cross-compilation build
|
||||
@@ -3333,10 +3325,6 @@ if test $_os = Darwin; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_macosx_version_max_allowed" = "" ; then
|
||||
with_macosx_version_max_allowed="$macosx_sdk"
|
||||
fi
|
||||
|
||||
# export this so that "xcrun" invocations later return matching values
|
||||
DEVELOPER_DIR="${MACOSX_SDK_PATH%/SDKs*}"
|
||||
DEVELOPER_DIR="${DEVELOPER_DIR%/Platforms*}"
|
||||
@@ -3422,51 +3410,13 @@ if test $_os = Darwin; then
|
||||
RANLIB=`xcrun -find ranlib`
|
||||
fi
|
||||
|
||||
case "$with_macosx_version_max_allowed" in
|
||||
10.13)
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED="101300"
|
||||
;;
|
||||
10.14)
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED="101400"
|
||||
;;
|
||||
10.15)
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED="101500"
|
||||
;;
|
||||
11.0)
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED="110000"
|
||||
;;
|
||||
11.1)
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED="110100"
|
||||
;;
|
||||
11.3)
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED="110300"
|
||||
;;
|
||||
12.0)
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED="120000"
|
||||
;;
|
||||
12.1)
|
||||
MAC_OS_X_VERSION_MAX_ALLOWED="120100"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported values are 10.13--12.1])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING([that macosx-version-min-required is coherent with macosx-version-max-allowed])
|
||||
if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MAC_OS_X_VERSION_MAX_ALLOWED; then
|
||||
AC_MSG_ERROR([the version minimum required, $MAC_OS_X_VERSION_MIN_REQUIRED, must be <= the version maximum allowed, $MAC_OS_X_VERSION_MAX_ALLOWED])
|
||||
else
|
||||
AC_MSG_RESULT([ok])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([that macosx-version-max-allowed is coherent with macos-with-sdk])
|
||||
if test $MAC_OS_X_VERSION_MAX_ALLOWED -gt $MACOSX_SDK_VERSION; then
|
||||
AC_MSG_ERROR([the version maximum allowed cannot be greater than the sdk level])
|
||||
AC_MSG_CHECKING([that macosx-version-min-required is coherent with macos-with-sdk])
|
||||
if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MACOSX_SDK_VERSION; then
|
||||
AC_MSG_ERROR([the version minimum required cannot be greater than the sdk level])
|
||||
else
|
||||
AC_MSG_RESULT([ok])
|
||||
fi
|
||||
AC_MSG_NOTICE([MAC_OS_X_VERSION_MIN_REQUIRED=$MAC_OS_X_VERSION_MIN_REQUIRED])
|
||||
AC_MSG_NOTICE([MAC_OS_X_VERSION_MAX_ALLOWED=$MAC_OS_X_VERSION_MAX_ALLOWED])
|
||||
|
||||
AC_MSG_CHECKING([whether to do code signing])
|
||||
|
||||
@@ -3542,7 +3492,6 @@ fi
|
||||
AC_SUBST(MACOSX_SDK_PATH)
|
||||
AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
|
||||
AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
|
||||
AC_SUBST(MAC_OS_X_VERSION_MAX_ALLOWED)
|
||||
AC_SUBST(INSTALL_NAME_TOOL)
|
||||
AC_SUBST(LIBTOOL) # Note that the macOS libtool command is unrelated to GNU libtool
|
||||
AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
|
||||
|
@@ -32,7 +32,7 @@ gb_OSDEFS := \
|
||||
-D_REENTRANT \
|
||||
-DNO_PTHREAD_PRIORITY \
|
||||
-DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) \
|
||||
-DMAC_OS_X_VERSION_MAX_ALLOWED=$(MAC_OS_X_VERSION_MAX_ALLOWED) \
|
||||
-DMAC_OS_X_VERSION_MAX_ALLOWED=$(MAC_OS_X_VERSION_MIN_REQUIRED) \
|
||||
$(LFS_CFLAGS) \
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user