summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian-hardened-buildflags-CPPFLAGS.diff
blob: 26061d63ffd6f1fae490c851b3b7157f10ad66c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- a/configure.ac-old	2012-03-02 21:48:47.000000000 +0000
+++ b/configure.ac	2012-03-02 21:51:29.000000000 +0000
@@ -10225,6 +10225,11 @@ else
 AC_SUBST(GSTREAMER_1_0_LIBS)
 AC_SUBST(ENABLE_GSTREAMER_1_0)
 
+if test -x /usr/bin/dpkg-buildflags; then
+       HARDEN_CPPFLAGS=`dpkg-buildflags --get CPPFLAGS 2>/dev/null`
+fi
+AC_SUBST(HARDEN_CPPFLAGS)
+
 ENABLE_OPENGL_TRANSITIONS=
 ENABLE_OPENGL_CANVAS=
 if test $_os = iOS -o $_os = Android -o "$ENABLE_FUZZERS" = "TRUE"; then
--- a/config_host.mk.in-old	2012-04-06 14:17:55.164239390 +0200
+++ b/config_host.mk.in	2012-04-06 14:18:55.440239065 +0200
@@ -76,6 +76,7 @@
 export CPPUNIT_LIBS=$(gb_SPACE)@CPPUNIT_LIBS@
 export CPUNAME=@CPUNAME@
 export CDEFAULTOPT=@CDEFAULTOPT@
+export HARDEN_CPPFLAGS=@HARDEN_CPPFLAGS@
 export CROSS_COMPILING=@CROSS_COMPILING@
 export CURL=@CURL@
 export CURL_CFLAGS=$(gb_SPACE)@CURL_CFLAGS@
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index c71cb40..f826d65 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -259,6 +259,8 @@ gb_GLOBALDEFS += \
 		DISABLE_DYNLOADING \
 	)
 
+gb_GLOBALDEFS += $(HARDEN_CPPFLAGS)
+
 gb_GLOBALDEFS := $(sort $(gb_GLOBALDEFS))
 
 # Common environment variables passed into all gb_*Test classes: