Source: mono
Severity: important
Tags: patch

Please enabled hardened build flags through dpkg-buildflags.

Patch attached. (dpkg-buildflags abides "noopt" from DEB_BUILD_OPTIONS)

Cheers,
        Moritz
diff -aur mono-2.10.5.harden/debian/rules mono-2.10.5/debian/rules
--- mono-2.10.5.harden/debian/rules	2012-01-16 04:53:21.000000000 +0100
+++ mono-2.10.5/debian/rules	2012-01-16 18:19:59.000000000 +0100
@@ -50,12 +50,6 @@
 	CONF_FLAGS += --with-sgen=no
 endif
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0 -g
-else
-	CFLAGS += -O2 -g
-endif
-
 ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 	MINI_TEST = true
 	MONO_BOEHM_TEST = true
@@ -78,7 +72,10 @@
 	MDB_VARS += -Vmdb:Recommends=$(MDB_REL)
 endif
 
-CONFIGURE =	CFLAGS="$(CFLAGS)" \
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+CONFIGURE =	CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"   \
 		./configure $(CONF_FLAGS) --prefix=/usr \
 		  --mandir=\$${prefix}/share/man \
 		  --infodir=\$${prefix}/share/info --sysconfdir=/etc \
Nur in mono-2.10.5/debian/: rules~.

Reply via email to