config_host.mk.in | 1 configure.ac | 57 ++------------------------------------- solenv/gbuild/platform/macosx.mk | 2 - 3 files changed, 4 insertions(+), 56 deletions(-)
New commits: commit b0ab07ba89c88006932c68e0ca08dffcd0a4621e Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Jan 13 08:06:12 2022 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Jan 13 09:33:25 2022 +0100 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 <t...@collabora.com> Tested-by: Jenkins diff --git a/config_host.mk.in b/config_host.mk.in index 8d7b6bdfe7bf..c5a945b96522 100644 --- a/config_host.mk.in +++ b/config_host.mk.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@ diff --git a/configure.ac b/configure.ac index de2ff85defcc..911a02107f52 100644 --- a/configure.ac +++ b/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) diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index b00da24116d5..5c072cba4dff 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -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) \