Debian: add FORTIFY_SOURCE flag to build

This commit is contained in:
alan (NyxTrail) 2024-03-09 08:43:14 +00:00
parent e0889b60d0
commit 7e21f29cd5
No known key found for this signature in database
GPG Key ID: 32C5D29762C48D4A
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,15 @@
Description: Add the FORTIFY_SOURCE build flag
Author: Alan M Varghese <alan@digistorm.in>
Last-Update: 2024-03-09
Forwarded: not-needed
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,7 +37,7 @@
include_directories(.)
add_compile_options(-std=c++2b -DWLR_USE_UNSTABLE )
-add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing)
+add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -D_FORTIFY_SOURCE=2)
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)

View File

@ -1,2 +1,2 @@
# You must remove unused comment lines for the released package.
001-create-directories-in-install-path.patch 001-create-directories-in-install-path.patch
002-add-fortify-flags.patch