File linking.patch of Package passwordsafe
Index: pwsafe-1.17.0/CMakeLists.txt
===================================================================
--- pwsafe-1.17.0.orig/CMakeLists.txt
+++ pwsafe-1.17.0/CMakeLists.txt
@@ -332,6 +332,7 @@ else ()
endif (NOT NO_QR)
target_link_libraries(pwsafe ${wxWidgets_LIBRARIES} uuid Xtst X11 curl ${OPENSSL_SSL_LIBRARY} ${MAGIC_LIBRARIES}
${CMAKE_REQUIRED_LIBRARIES})
+ set_target_properties(pwsafe PROPERTIES LINK_FLAGS "-z relro -fpie -pie")
endif()
# Installation stuff (for 'make install', but mainly for 'make package')
Index: pwsafe-1.17.0/src/ui/cli/CMakeLists.txt
===================================================================
--- pwsafe-1.17.0.orig/src/ui/cli/CMakeLists.txt
+++ pwsafe-1.17.0/src/ui/cli/CMakeLists.txt
@@ -31,6 +31,7 @@ install (TARGETS pwsafe-cli RUNTIME DEST
if (IPO_SUPPORTED)
set_property(TARGET pwsafe-cli PROPERTY INTERPROCEDURAL_OPTIMIZATION_RELEASE True)
+ set_target_properties(pwsafe-cli PROPERTIES LINK_FLAGS "-z relro -fpie -pie")
endif (IPO_SUPPORTED)
target_link_libraries(pwsafe-cli core os core uuid ${wxWidgets_LIBRARIES})