mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-26 14:52:20 +00:00
build: enable ASLR for statically linked build
Co-authored-by: Lorenzo Fontana <lo@linux.com> Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
parent
aefd67eb8a
commit
d0be6d96d0
@ -66,10 +66,11 @@ if(MINIMAL_BUILD)
|
||||
endif()
|
||||
|
||||
if(MUSL_OPTIMIZED_BUILD)
|
||||
set(MUSL_FLAGS "-static -Os")
|
||||
set(MUSL_FLAGS "-static -Os -fPIE -pie")
|
||||
endif()
|
||||
|
||||
# explicitly set hardening flags
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(FALCO_SECURITY_FLAGS "-Wl,-z,relro,-z,now -fstack-protector-strong")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "release")
|
||||
set(FALCO_SECURITY_FLAGS "${FALCO_SECURITY_FLAGS} -D_FORTIFY_SOURCE=2")
|
||||
|
Loading…
Reference in New Issue
Block a user