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 <alexandru.croitor@qt.io>
This commit is contained in:
Thiago Macieira 2022-07-15 16:32:11 -07:00
parent 78ef9e9d14
commit 396170d07b
9 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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 "$<$<CXX_COMPILER_ID:GNU>:-mno-direct-extern-access>")
target_compile_options(Platform INTERFACE "$<$<CXX_COMPILER_ID:Clang>:-fno-direct-access-external-data>")
endif()

View File

@ -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

View File

@ -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