diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/.prev_CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/corelib/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/corelib/Qt6CoreConfigExtras.cmake.in | 12 | ||||
| -rw-r--r-- | src/gui/.prev_CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/gui/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/widgets/.prev_CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/widgets/CMakeLists.txt | 5 |
7 files changed, 25 insertions, 17 deletions
diff --git a/src/corelib/.prev_CMakeLists.txt b/src/corelib/.prev_CMakeLists.txt index a0b11a73297..51885497bf8 100644 --- a/src/corelib/.prev_CMakeLists.txt +++ b/src/corelib/.prev_CMakeLists.txt @@ -250,6 +250,10 @@ qt_add_simd_part(Core SIMD mips_dsp text/qstring_mips_dsp_asm.S ) +if(QT_FEATURE_reduce_relocations AND UNIX AND GCC) + target_link_options(Core PRIVATE + "LINKER:--dynamic-list=${CMAKE_CURRENT_LIST_DIR}/QtCore.dynlist") +endif() if(ANDROID) set_property(TARGET Core APPEND PROPERTY QT_ANDROID_BUNDLED_JAR_DEPENDENCIES @@ -272,7 +276,6 @@ endif() # MODULE = "core" # MODULE_CONFIG = "moc" "resources" # QMAKE_DSYM_DEBUG_SCRIPT = "$$PWD/debug_script.py" -# QMAKE_DYNAMIC_LIST_FILE = "$$PWD/QtCore.dynlist" # QMAKE_PKGCONFIG_VARIABLES = "host_bins" "qt_conf" # QMAKE_SUBSTITUTES = "ctest_macros_file" "cmake_umbrella_config_file" "cmake_umbrella_config_module_location" "cmake_umbrella_config_module_location_for_install" "cmake_umbrella_config_version_file" "cmake_extras_mkspec_dir" "cmake_extras_mkspec_dir_for_install" # cmake_extras_mkspec_dir.input = "$$PWD/Qt5CoreConfigExtrasMkspecDir.cmake.in" diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 8e236ec3f5e..b62ce89f4d6 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -358,6 +358,10 @@ qt_add_simd_part(Core SIMD mips_dsp text/qstring_mips_dsp_asm.S ) +if(QT_FEATURE_reduce_relocations AND UNIX AND GCC) + target_link_options(Core PRIVATE + "LINKER:--dynamic-list=${CMAKE_CURRENT_LIST_DIR}/QtCore.dynlist") +endif() if(ANDROID) set_property(TARGET Core APPEND PROPERTY QT_ANDROID_BUNDLED_JAR_DEPENDENCIES @@ -380,7 +384,6 @@ endif() # MODULE = "core" # MODULE_CONFIG = "moc" "resources" # QMAKE_DSYM_DEBUG_SCRIPT = "$$PWD/debug_script.py" -# QMAKE_DYNAMIC_LIST_FILE = "$$PWD/QtCore.dynlist" # QMAKE_PKGCONFIG_VARIABLES = "host_bins" "qt_conf" # QMAKE_SUBSTITUTES = "ctest_macros_file" "cmake_umbrella_config_file" "cmake_umbrella_config_module_location" "cmake_umbrella_config_module_location_for_install" "cmake_umbrella_config_version_file" "cmake_extras_mkspec_dir" "cmake_extras_mkspec_dir_for_install" # cmake_extras_mkspec_dir.input = "$$PWD/Qt5CoreConfigExtrasMkspecDir.cmake.in" diff --git a/src/corelib/Qt6CoreConfigExtras.cmake.in b/src/corelib/Qt6CoreConfigExtras.cmake.in index cb1dc9689cb..984980b5dc2 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() diff --git a/src/gui/.prev_CMakeLists.txt b/src/gui/.prev_CMakeLists.txt index 8d1ea159f01..953dc8b2dad 100644 --- a/src/gui/.prev_CMakeLists.txt +++ b/src/gui/.prev_CMakeLists.txt @@ -241,9 +241,12 @@ qt_add_resource(Gui "qpdf" ${qpdf_resource_files} ) +if(QT_FEATURE_reduce_relocations AND UNIX AND GCC) + target_link_options(Gui PRIVATE + "LINKER:--dynamic-list=${CMAKE_CURRENT_LIST_DIR}/QtGui.dynlist") +endif() #### Keys ignored in scope 1:.:.:gui.pro:<TRUE>: -# QMAKE_DYNAMIC_LIST_FILE = "$$PWD/QtGui.dynlist" # QMAKE_LIBS = "$$QMAKE_LIBS_GUI" ## Scopes: diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 1383381c85c..14859069a55 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -290,6 +290,11 @@ qt_add_resource(Gui "qpdf" ${qpdf_resource_files} ) +if(QT_FEATURE_reduce_relocations AND UNIX AND GCC) + target_link_options(Gui PRIVATE + "LINKER:--dynamic-list=${CMAKE_CURRENT_LIST_DIR}/QtGui.dynlist") +endif() + # special case begin # Replace arch_haswell with avx2 feature. That is what is used in the code requireing # this file, too! diff --git a/src/widgets/.prev_CMakeLists.txt b/src/widgets/.prev_CMakeLists.txt index db39f84104f..51e8f8064df 100644 --- a/src/widgets/.prev_CMakeLists.txt +++ b/src/widgets/.prev_CMakeLists.txt @@ -279,10 +279,13 @@ qt_add_resource(Widgets "qstyle1" ${qstyle1_resource_files} ) +if(QT_FEATURE_reduce_relocations AND UNIX AND GCC) + target_link_options(Widgets PRIVATE + "LINKER:--dynamic-list=${CMAKE_CURRENT_LIST_DIR}/QtWidgets.dynlist") +endif() #### Keys ignored in scope 1:.:.:widgets.pro:<TRUE>: # MODULE_CONFIG = "uic" -# QMAKE_DYNAMIC_LIST_FILE = "$$PWD/QtWidgets.dynlist" # QMAKE_LIBS = "$$QMAKE_LIBS_GUI" ## Scopes: diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index e756b27bee2..b3c015f3db6 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -281,10 +281,13 @@ qt_add_resource(Widgets "qstyle1" ${qstyle1_resource_files} ) +if(QT_FEATURE_reduce_relocations AND UNIX AND GCC) + target_link_options(Widgets PRIVATE + "LINKER:--dynamic-list=${CMAKE_CURRENT_LIST_DIR}/QtWidgets.dynlist") +endif() #### Keys ignored in scope 1:.:.:widgets.pro:<TRUE>: # MODULE_CONFIG = "uic" -# QMAKE_DYNAMIC_LIST_FILE = "$$PWD/QtWidgets.dynlist" # QMAKE_LIBS = "$$QMAKE_LIBS_GUI" ## Scopes: |
