23 lines
994 B
Diff
23 lines
994 B
Diff
diff --git a/src/settings.cmake b/src/settings.cmake
|
|
--- a/src/settings.cmake
|
|
+++ b/src/settings.cmake
|
|
@@ -174,6 +174,7 @@
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions")
|
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now")
|
|
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pie")
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie -Wl,--build-id=sha1 -Wl,-z,relro,-z,now")
|
|
add_compile_options(-fstack-protector-strong)
|
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
--- a/src/corehost/cli/apphost/CMakeLists.txt
|
|
+++ b/src/corehost/cli/apphost/CMakeLists.txt
|
|
@@ -50,6 +50,8 @@
|
|
|
|
add_definitions(-DFEATURE_APPHOST=1)
|
|
|
|
+set_target_properties("apphost" PROPERTIES LINK_FLAGS -pie)
|
|
+
|
|
# Disable manifest generation into the file .exe on Windows
|
|
if(WIN32)
|
|
set_property(TARGET ${PROJECT_NAME} PROPERTY
|