Debian build: Include buildflags

Include the buildflags without patching upstream source. We just
need to export the variables correctly for this to work.
This commit is contained in:
alan (NyxTrail) 2024-04-06 16:25:31 +00:00
parent 9a2a2a9cc1
commit 4be2ca8f90
No known key found for this signature in database
GPG Key ID: 32C5D29762C48D4A
3 changed files with 3 additions and 16 deletions

View File

@ -1,15 +0,0 @@
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 @@
001-create-directories-in-install-path.patch 001-create-directories-in-install-path.patch
002-add-fortify-flags.patch

3
debian/rules vendored
View File

@ -4,6 +4,9 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
%: %:
dh $@ dh $@