From 396170d07b768ca53665c67046555e5fabe78801 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 15 Jul 2022 16:32:11 -0700 Subject: [PATCH] CMake: fix the word order in "no_direct_extern_access" And take the opportunity to remove the "m" in the qmake feature name and .prf file. Pick-to: 6.4 Change-Id: I36b24183fbd041179f2ffffd170224ab75cdd968 Reviewed-by: Alexandru Croitor --- cmake/QtModuleHelpers.cmake | 2 +- cmake/QtPlatformTargetHelpers.cmake | 2 +- .../CMakeLists.txt | 0 .../lib.cpp | 0 .../lib.h | 0 .../main.cpp | 0 configure.cmake | 14 +++++++------- mkspecs/features/qt.prf | 2 +- ...rect_access.prf => no_direct_extern_access.prf} | 0 9 files changed, 10 insertions(+), 10 deletions(-) rename config.tests/{direct_extern_access => no_direct_extern_access}/CMakeLists.txt (100%) rename config.tests/{direct_extern_access => no_direct_extern_access}/lib.cpp (100%) rename config.tests/{direct_extern_access => no_direct_extern_access}/lib.h (100%) rename config.tests/{direct_extern_access => no_direct_extern_access}/main.cpp (100%) rename mkspecs/features/unix/{mno_extern_direct_access.prf => no_direct_extern_access.prf} (100%) diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake index d2e5575989..087816a4bb 100644 --- a/cmake/QtModuleHelpers.cmake +++ b/cmake/QtModuleHelpers.cmake @@ -204,7 +204,7 @@ function(qt_internal_add_module target) qt_internal_get_framework_info(fw ${target}) endif() - if(NOT QT_FEATURE_no_extern_direct_access AND QT_FEATURE_reduce_relocations AND + if(NOT QT_FEATURE_no_direct_extern_access AND QT_FEATURE_reduce_relocations AND UNIX AND NOT is_interface_lib) # 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 diff --git a/cmake/QtPlatformTargetHelpers.cmake b/cmake/QtPlatformTargetHelpers.cmake index 47cffc8040..24c8749e62 100644 --- a/cmake/QtPlatformTargetHelpers.cmake +++ b/cmake/QtPlatformTargetHelpers.cmake @@ -41,7 +41,7 @@ function(qt_internal_setup_public_platform_target) endif() target_link_options(Platform INTERFACE "${libc_link_option}") endif() - if (QT_FEATURE_no_extern_direct_access) + if (QT_FEATURE_no_direct_extern_access) target_compile_options(Platform INTERFACE "$<$:-mno-direct-extern-access>") target_compile_options(Platform INTERFACE "$<$:-fno-direct-access-external-data>") endif() diff --git a/config.tests/direct_extern_access/CMakeLists.txt b/config.tests/no_direct_extern_access/CMakeLists.txt similarity index 100% rename from config.tests/direct_extern_access/CMakeLists.txt rename to config.tests/no_direct_extern_access/CMakeLists.txt diff --git a/config.tests/direct_extern_access/lib.cpp b/config.tests/no_direct_extern_access/lib.cpp similarity index 100% rename from config.tests/direct_extern_access/lib.cpp rename to config.tests/no_direct_extern_access/lib.cpp diff --git a/config.tests/direct_extern_access/lib.h b/config.tests/no_direct_extern_access/lib.h similarity index 100% rename from config.tests/direct_extern_access/lib.h rename to config.tests/no_direct_extern_access/lib.h diff --git a/config.tests/direct_extern_access/main.cpp b/config.tests/no_direct_extern_access/main.cpp similarity index 100% rename from config.tests/direct_extern_access/main.cpp rename to config.tests/no_direct_extern_access/main.cpp diff --git a/configure.cmake b/configure.cmake index 65659c31ab..5d2acc571e 100644 --- a/configure.cmake +++ b/configure.cmake @@ -207,9 +207,9 @@ qt_config_compiler_supports_flag_test(optimize_debug FLAG "-Og" ) -qt_config_compile_test(no_extern_direct_access - LABEL "-mno-direct-extern-access support" - PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/direct_extern_access" +qt_config_compile_test(no_direct_extern_access + LABEL "-mno-direct-extern-access / -fno-direct-access-external-data support" + PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/no_direct_extern_access" ) qt_config_linker_supports_flag_test(enable_new_dtags @@ -668,12 +668,12 @@ qt_feature("reduce_exports" PRIVATE ) qt_feature_definition("reduce_exports" "QT_VISIBILITY_AVAILABLE") qt_feature_config("reduce_exports" QMAKE_PUBLIC_QT_CONFIG) -qt_feature("no_extern_direct_access" PRIVATE +qt_feature("no_direct_extern_access" PRIVATE LABEL "Use protected visibility and -mno-direct-extern-access" - CONDITION NOT WIN32 AND TEST_no_extern_direct_access + CONDITION NOT WIN32 AND TEST_no_direct_extern_access ) -qt_feature_definition("no_extern_direct_access" "QT_USE_PROTECTED_VISIBILITY") -qt_feature_config("no_extern_direct_access" QMAKE_PUBLIC_QT_CONFIG) +qt_feature_definition("no_direct_extern_access" "QT_USE_PROTECTED_VISIBILITY") +qt_feature_config("no_direct_extern_access" QMAKE_PUBLIC_QT_CONFIG) qt_feature("reduce_relocations" PUBLIC LABEL "Reduce amount of relocations" CONDITION NOT WIN32 AND TEST_reduce_relocations diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 0e03027bc3..d0f82dc99c 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -59,7 +59,7 @@ qaxserver { !force_import_plugins:!contains(TEMPLATE, ".*app"):!if(contains(TEMPLATE, ".*lib"):dll): \ CONFIG -= import_plugins unix { - contains(QT_CONFIG, no_extern_direct_access): CONFIG += mno_extern_direct_access + contains(QT_CONFIG, no_direct_extern_access): CONFIG += no_direct_extern_access else:contains(QT_CONFIG, reduce_relocations):!contains(TEMPLATE, .*lib): { QMAKE_CFLAGS += $$QMAKE_CFLAGS_PIC QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_PIC diff --git a/mkspecs/features/unix/mno_extern_direct_access.prf b/mkspecs/features/unix/no_direct_extern_access.prf similarity index 100% rename from mkspecs/features/unix/mno_extern_direct_access.prf rename to mkspecs/features/unix/no_direct_extern_access.prf