File linking.patch of Package passwordsafe
Index: pwsafe-1.21.0/CMakeLists.txt
===================================================================
--- pwsafe-1.21.0.orig/CMakeLists.txt
+++ pwsafe-1.21.0/CMakeLists.txt
@@ -334,6 +334,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.21.0/src/ui/cli/CMakeLists.txt
===================================================================
--- pwsafe-1.21.0.orig/src/ui/cli/CMakeLists.txt
+++ pwsafe-1.21.0/src/ui/cli/CMakeLists.txt
@@ -33,6 +33,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 ${wxWidgets_LIBRARIES})