Try to ensure that -fPIC is used in CMake builds
In commit 36d6eb721e
the -fPIE switch was
replaced with -fPIC in an effort to avoid generating copy relocations
which are incompatible with Qt5 when built with -reduce-relocations.
Task-number: QTBUG-45755
Change-Id: I59a55ea15052f498104848c5fd867e563ddc2290
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
d14397b729
commit
083c9269ed
@ -70,8 +70,9 @@ set(_qt5_corelib_extra_includes)
|
||||
# Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module
|
||||
# macro to add it.
|
||||
set(Qt5_POSITION_INDEPENDENT_CODE True)
|
||||
set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
|
||||
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIC\")
|
||||
set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
|
||||
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS ${Qt5Core_EXECUTABLE_COMPILE_FLAGS})
|
||||
|
||||
!!IF !isEmpty(QT_NAMESPACE)
|
||||
list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE)
|
||||
|
Loading…
Reference in New Issue
Block a user