Line
Link Here
|
|
Fix build failure with GCC 5 and Qt 5.4.2. |
|
Fix build failure with GCC 5 and Qt 5.4.2. |
1 |
|
1 |
|
2 |
Recent versions of GCC (>=5.1) will sometimes emit copy relocations when |
2 |
Recent versions of GCC (>=5.1) will sometimes emit copy relocations when |
3 |
|
3 |
|
4 |
Enabling CMAKE_POSITION_INDEPENDENT_CODE will cause cmake to add -fPIC or |
4 |
Enabling CMAKE_POSITION_INDEPENDENT_CODE will cause cmake to add -fPIC or |
5 |
-fPIE depending on the type of object being built. The try_compile() test |
5 |
-fPIE depending on the type of object being built. The try_compile() test |
6 |
for -fvisibility=hidden support is creating an executable so -fPIE is used |
6 |
for -fvisibility=hidden support is creating an executable so -fPIE is used |
7 |
which makes Qt throw a fit. |
7 |
which makes Qt throw a fit. |
8 |
|
8 |
|
9 |
Gentoo-Bug: https://bugs.gentoo.org/555866 |
9 |
Gentoo-Bug: https://bugs.gentoo.org/555866 |
10 |
See-Also: https://bugreports.qt.io/browse/QTBUG-45755 |
10 |
See-Also: https://bugreports.qt.io/browse/QTBUG-45755 |
11 |
-- |
|
|
12 |
cmake/FindPhononInternal.cmake | 4 ++-- |
11 |
cmake/FindPhononInternal.cmake | 4 ++-- |
13 |
1 file changed, 2 insertions(+), 2 deletions(-) |
12 |
1 file changed, 2 insertions(+), 2 deletions(-) |
14 |
-- a/cmake/FindPhononInternal.cmake |
13 |
++ b/cmake/FindPhononInternal.cmake |
Lines 109-116
else (NOT PHONON_BUILD_PHONON4QT5) # Qt5
Link Here
|
109 |
find_package(Qt5Widgets) |
109 |
find_package(Qt5Widgets) |
110 |
macro_log_feature(Qt5Widgets_FOUND "Qt5 Widgets (qtbase)" "" "" TRUE) |
110 |
macro_log_feature(Qt5Widgets_FOUND "Qt5 Widgets (qtbase)" "" "" TRUE) |
111 |
|
111 |
|
112 |
if (Qt5_POSITION_INDEPENDENT_CODE) |
112 |
if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC) |
113 |
set(CMAKE_POSITION_INDEPENDENT_CODE ON) |
113 |
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_PIC}") |
114 |
endif() |
114 |
endif() |
115 |
|
115 |
|
116 |
#---- compat |
116 |
#---- compat |