19 lines
752 B
Diff
19 lines
752 B
Diff
Description: Add FORTIFY_SOURCE flag directly in Makefile
|
|
The flag, otherwise, doesn't seem to propogate correctly to all
|
|
modules built by the project. Use 'checksec' and 'hardening-check'
|
|
for verifying fortification on binaries.
|
|
Author: Alan M Varghese
|
|
Last-Update: 2024-06-20
|
|
Forwarded: not-needed
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -92,7 +92,7 @@
|
|
add_compile_definitions(WLR_USE_UNSTABLE)
|
|
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value
|
|
-Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith
|
|
- -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=)
|
|
+ -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/= -D_FORTIFY_SOURCE=2)
|
|
|
|
set(CMAKE_EXECUTABLE_ENABLE_EXPORTS TRUE)
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
|