summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt6CoreConfigExtras.cmake.in
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-02-17 14:58:16 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-02-25 15:47:50 +0100
commit119ffd478134d793fb4414a65549acd19e919e0b (patch)
tree91f81998f26ec91771230b7def53d2e0ce5e4011 /src/corelib/Qt6CoreConfigExtras.cmake.in
parentbbf46e38b1d0f70b5c830b3ae2fccf66cf7edb8d (diff)
CMake: Port the reduce-relocations feature
As reduce-relocations implies bsymbolic_functions, we also add the -Bsymbolic-functions linker flag. Also, handle the .dynlist files that are passed to the linker by bsymbolic_functions.prf in the qmake build. Change-Id: I535c33fba888596d2f8975b16864bbe9f0a7caa4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/Qt6CoreConfigExtras.cmake.in')
-rw-r--r--src/corelib/Qt6CoreConfigExtras.cmake.in12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/corelib/Qt6CoreConfigExtras.cmake.in b/src/corelib/Qt6CoreConfigExtras.cmake.in
index cb1dc9689c..984980b5dc 100644
--- a/src/corelib/Qt6CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt6CoreConfigExtras.cmake.in
@@ -18,18 +18,6 @@ if (NOT QT_NO_CREATE_TARGETS)
set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY
COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE
)
-
- # On x86 and x86-64 systems with ELF binaries (especially Linux), due to
- # a new optimization in GCC 5.x in combination with a recent version of
- # GNU binutils, compiling Qt applications with -fPIE is no longer
- # enough.
- # Applications now need to be compiled with the -fPIC option if the Qt option
- # \"reduce relocations\" is active. For backward compatibility only, Qt accepts
- # the use of -fPIE for GCC 4.x versions.
- if (CMAKE_CXX_COMPILER MATCHES "icc.*$" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-fPIC")
- endif()
-
if (NOT "@QT_NAMESPACE@" STREQUAL "")
set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=@QT_NAMESPACE@)
endif()