Comment # 6
on bug 11643
from Peter Wu
Sigh, GCC 5 / Qt 5 is a mess. Aside, for those who want to learn the
differences between -fPIC, -fPIE and no such flag, see
http://www.openbsd.org/papers/nycbsdcon08-pie/.
set(CMAKE_POSITION_INDEPENDENT_CODE on) enables -fPIE for executables and -fPIC
for libraries (which is done by default on Linux x86_64). -fPIE is already
added for dumpcap on autotools, it would be a nice addition for cmake and all
other binaries.
Apparently Qt5 + GCC 5 is broken with -fPIE which makes Qt cry aloud. For some
reason the compile check from https://code.wireshark.org/review/11079 results
in -fPIC -fPIE being tested which makes Qt unhappy.
On Debian testing, reverting 08a20705b4d03cb4460e13d3c270077930a75310, removing
the whole Qt5Widgets_EXECUTABLE_COMPILE_FLAGS check and removing fPIC from the
flags all fix the build (as does building with Clang instead of GCC). (I guess
that removing -fPIC is possible because CMAKE_POSITION_INDEPENDENT_CODE is
set).
Unconditionally removing fPIC should not hurt on modern versions of cmake, but
for older versions... I don't know. Let's try to revert the patch and remove
the flag for MSVC only.
You are receiving this mail because:
- You are watching all bug changes.