diff --git a/debian/patches/005-add-fortify-flags-for-subprojects.patch b/debian/patches/005-add-fortify-flags-for-subprojects.patch new file mode 100644 index 0000000..2b29f5e --- /dev/null +++ b/debian/patches/005-add-fortify-flags-for-subprojects.patch @@ -0,0 +1,18 @@ +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) diff --git a/debian/patches/series b/debian/patches/series index a281505..033a08d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ 002-use-system-udis86.patch 003-use-system-hyprland-protocols.patch 004-fix-hyprland-symlink.patch +005-add-fortify-flags-for-subprojects.patch