summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-02-14 15:23:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-14 17:29:45 +0100
commitb7fd89100d8653dc73955780358fe31d38b68ebf (patch)
tree61130b26cab8aa97eceafd283e0f850cdeeb6010 /configure.ac
parent391613785ae6fbb735cf7a86ea2f6a93161a8769 (diff)
tdf#122218: Baseline Xcode 9.3 ld presumably doesn't support -platform_version
...according to <https://github.com/llvm/llvm-project/commit/ 25ce33a6e4f3b13732c0f851e68390dc2acb9123> "[driver][darwin] Pass -platform_version flag to the linker instead of the -<platform>_version_min flag": "In Xcode 11, ld added a new flag called -platform_version [...] This patch adopts the new -platform_version flag in Clang, and starts using it by default, unless a linker version < 520 is passed to the driver." So detect new HAVE_MACOS_LD_PLATFORMVERSION and adapt 645fe53be0dc36535dba0ed684e21ca4cda80d70 "tdf#122218: Hack to avoid blurry text with macOS SDK 10.15" accordingly. (This also changes the passed -platform_verion sdk value from 0.0 to 0.0.0, for cosmetic consistency with the default Clang behavior cited above. Also, after f67e5ef9a5c71f3b35b1c67eb72794e44cc15410 "Drop broken filter-out of -bind_at_load for Executable_soffice_bin on macOS" got included in the meantime, the surrounding ifeq in desktop/Executable_soffice_bin.mk can be combined now.) Change-Id: Ie1ddf2d618e2f1232c6b4e17ce17665851f3bd38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88717 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 631a4a9709f1..3fa8fc760e3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2792,6 +2792,7 @@ dnl ===================================================================
dnl Check macOS SDK and compiler
dnl ===================================================================
+HAVE_MACOS_LD_PLATFORMVERSION=
if test $_os = Darwin; then
# If no --with-macosx-sdk option is given, look for one
@@ -3027,6 +3028,16 @@ if test $_os = Darwin; then
AC_MSG_CHECKING([what macOS app bundle identifier to use])
MACOSX_BUNDLE_IDENTIFIER=$with_macosx_bundle_identifier
AC_MSG_RESULT([$MACOSX_BUNDLE_IDENTIFIER])
+
+ AC_MSG_CHECKING([whether the linker supports -platform_version])
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Xlinker -platform_version -Xlinker macos \
+ -Xlinker $MAC_OS_X_VERSION_MIN_REQUIRED_DOTS -Xlinker 0.0.0"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ [AC_MSG_RESULT([yes])
+ HAVE_MACOS_LD_PLATFORMVERSION=TRUE],
+ [AC_MSG_RESULT([no])])
+ LDFLAGS=$save_LDFLAGS
fi
AC_SUBST(MACOSX_SDK_PATH)
AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
@@ -3039,6 +3050,7 @@ AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
AC_SUBST(MACOSX_PACKAGE_SIGNING_IDENTITY)
AC_SUBST(ENABLE_MACOSX_SANDBOX)
AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
+AC_SUBST(HAVE_MACOS_LD_PLATFORMVERSION)
dnl ===================================================================
dnl Check iOS SDK and compiler