From 4be2ca8f909705a1cbd38873884fc77555711159 Mon Sep 17 00:00:00 2001 From: "alan (NyxTrail)" Date: Sat, 6 Apr 2024 16:25:31 +0000 Subject: [PATCH] Debian build: Include buildflags Include the buildflags without patching upstream source. We just need to export the variables correctly for this to work. --- debian/patches/002-add-fortify-flags.patch | 15 --------------- debian/patches/series | 1 - debian/rules | 3 +++ 3 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 debian/patches/002-add-fortify-flags.patch diff --git a/debian/patches/002-add-fortify-flags.patch b/debian/patches/002-add-fortify-flags.patch deleted file mode 100644 index 353d826..0000000 --- a/debian/patches/002-add-fortify-flags.patch +++ /dev/null @@ -1,15 +0,0 @@ -Description: Add the FORTIFY_SOURCE build flag -Author: Alan M Varghese -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) diff --git a/debian/patches/series b/debian/patches/series index 183ed31..9413bf4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ 001-create-directories-in-install-path.patch -002-add-fortify-flags.patch diff --git a/debian/rules b/debian/rules index b824fd0..0cb06c3 100755 --- a/debian/rules +++ b/debian/rules @@ -4,6 +4,9 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 +export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) +export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) + %: dh $@