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