Bring back fortification patch

Patch was removed in: #ad9c24eb.
This commit is contained in:
alan (NyxTrail) 2024-06-20 07:50:15 +00:00
parent 67fcb1416e
commit 0abfc96402
No known key found for this signature in database
GPG Key ID: 32C5D29762C48D4A
2 changed files with 19 additions and 0 deletions

View File

@ -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)

View File

@ -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