cmake: avoid adding -fPIE to libraries (fixes gcc 4.7)
authorPeter Wu <peter@lekensteyn.nl>
Fri, 9 Oct 2015 21:43:02 +0000 (23:43 +0200)
committerPeter Wu <peter@lekensteyn.nl>
Wed, 14 Oct 2015 22:49:47 +0000 (22:49 +0000)
commit95804d94e8cc07c6361287ff7ade0600f11b2078
treed63751c80df4186acb767fb5a4a2d3a5d982f939
parent14085e043a2b7f3b53d1c57fe2a06beb691c95dc
cmake: avoid adding -fPIE to libraries (fixes gcc 4.7)

On Debian Wheezy, the cmake build would fail with:

    /usr/bin/ld: CMakeFiles/wsutil.dir/privileges.c.o: relocation
    R_X86_64_PC32 against symbol `started_with_special_privs' can not be
    used when making a shared object; recompile with -fPIC

Issue was introduced with v1.99.10rc0-222-g3fb1d68 ("cmake: Enable PIE
when it is available by default").

Bug: 11587
Change-Id: I62eec8d1db020128eeeb77b38e3316abf71e6e6a
Reviewed-on: https://code.wireshark.org/review/10916
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
CMakeLists.txt