summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <torarnv@gmail.com>2020-03-27 11:53:35 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-03-31 03:57:00 +0000
commit6a60192ac03d0b4ab542191065122243cebcd1ca (patch)
tree07309012790d15560d30aca682e77f2f77ef2db9
parentf432c08882ffebe5074ea28de871559a98a4d094 (diff)
Pass SDK root to the linker as -isysroot, not -Wl,-syslibroot
The former option to clang will result in more options to the linker, such as the newly introduced -platform_version, which writes the SDK version to the resulting binary. By using the syslibroot flag directly we were missing the platform version, and binaries were left without an SDK version set, resulting in failed validation of the binary. Going with the clang driver gives us the right behavior for free. Fixes: QTBUG-83100 Change-Id: I98bc9ba644dae4bcc7a6a88481556bae185ce5fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rwxr-xr-xconfigure5
-rw-r--r--mkspecs/features/mac/default_post.prf4
2 files changed, 3 insertions, 6 deletions
diff --git a/configure b/configure
index ef7bad1bfc..f9407ef587 100755
--- a/configure
+++ b/configure
@@ -271,12 +271,9 @@ macSDKify()
val=$(echo $sdk_val $(echo $val | cut -s -d ' ' -f 2-))
echo "$var=$val"
;;
- QMAKE_CFLAGS=*|QMAKE_CXXFLAGS=*)
+ QMAKE_CFLAGS=*|QMAKE_CXXFLAGS=*|QMAKE_LFLAGS=*)
echo "$line -isysroot $sysroot $version_min_flag"
;;
- QMAKE_LFLAGS=*)
- echo "$line -Wl,-syslibroot,$sysroot $version_min_flag"
- ;;
*)
echo "$line"
;;
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 993f4d56a9..d052808c14 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -197,7 +197,7 @@ macx-xcode {
-isysroot$$xcodeSDKInfo(Path, $$sdk)
QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \
-Xarch_$${arch} \
- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk)
+ -isysroot$$xcodeSDKInfo(Path, $$sdk)
QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch})
@@ -218,7 +218,7 @@ macx-xcode {
version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag
+ QMAKE_LFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
}
# Enable precompiled headers for multiple architectures