path: root/mkspecs/features
diff options
authorTor Arne Vestbø <>2020-03-27 11:53:35 +0100
committerTor Arne Vestbø <>2020-04-02 18:33:42 +0200
commit6387138a7991b4588639dc48847f175b5afaff84 (patch)
treef93b15d9a913c800ffd6395dbb11eea848b4e747 /mkspecs/features
parent53ed635dbb5d1ab8103eb1161f81c7e4102d1df2 (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 <> Reviewed-by: Timur Pocheptsov <> (cherry picked from commit 6a60192ac03d0b4ab542191065122243cebcd1ca) Reviewed-by: Tor Arne Vestbø <>
Diffstat (limited to 'mkspecs/features')
1 files changed, 2 insertions, 2 deletions
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index ba163efc18..92a9112bca 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -198,7 +198,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)
@@ -222,7 +222,7 @@ macx-xcode {
version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
QMAKE_CFLAGS += -isysroot $$sysroot_path $$version_min_flag
QMAKE_CXXFLAGS += -isysroot $$sysroot_path $$version_min_flag
- QMAKE_LFLAGS += -Wl,-syslibroot,$$sysroot_path $$version_min_flag
+ QMAKE_LFLAGS += -isysroot $$sysroot_path $$version_min_flag
# Enable precompiled headers for multiple architectures