1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Description: Add relro linker flag to SWIG
* Lintian throws a hardening-no-relro warning, somehow
the standard dpkg linker flags are not passed to
the cmake build.
* Also add as-needed flag because of dpkg-shlibdeps warnings.
Author: Paul Klos <kolab@klos2day.nl>
Last-Update: 2013-04-11
--- a/cmake/modules/SWIGUtils.cmake
+++ b/cmake/modules/SWIGUtils.cmake
@@ -16,7 +16,7 @@
#Compile PHP Bindings
# Since there is no php library we can't compile with -Wl,--no-undefined
- set(CMAKE_SHARED_LINKER_FLAGS "")
+ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-z,relro,--as-needed")
if (APPLE)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flat_namespace -undefined suppress" )
|