[pkg-wine-party] Bug#658039: Please enable hardened build flags
Source: wine-unstable
Severity: important
Tags: patch
Please enable hardened build flags through dpkg-buildflags.
Patch attached. (dpkg-buildflags abides "noopt" from DEB_BUILD_OPTIONS)
Cheers,
Moritz
diff -aur wine-unstable-1.1.36.harden/debian/rules wine-unstable-1.1.36/debian/rules
--- wine-unstable-1.1.36.harden/debian/rules 2012-01-30 22:11:04.000000000 +0100
+++ wine-unstable-1.1.36/debian/rules 2012-01-30 22:16:30.000000000 +0100
@@ -6,17 +6,15 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
-CFLAGS=-O0 -g
-else
-CFLAGS=-O2 -g
-endif
-LDFLAGS=
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+
CONFIGOPTS = --with-x --disable-tests
DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
@@ -51,11 +49,13 @@
IA32_CC := $(CC)
IA32_CFLAGS := $(CFLAGS)
IA32_LDFLAGS := $(LDFLAGS)
+IA32_CPPFLAGS := $(CPPFLAGS)
IA32_LIBDIR := $(LIBDIR)
# Win64 version requires gcc >= 4.4
AMD64_CC := gcc-4.4
AMD64_CFLAGS := $(CFLAGS)
+AMD64_CPPFLAGS := $(CPPFLAGS)
AMD64_LDFLAGS := $(LDFLAGS)
AMD64_LIBDIR := $(LIBDIR)
@@ -155,6 +155,7 @@
cd build32 && \
CC="$(IA32_CC)" \
CFLAGS="$(IA32_CFLAGS)" \
+ CPPFLAGS="$(IA32_CPPFLAGS)" \
LDFLAGS="$(IA32_LDFLAGS)" \
../configure --disable-win64 $(CONFIGOPTS) \
--prefix=/usr \
@@ -177,6 +178,7 @@
cd build64 && \
CC="$(AMD64_CC)" \
CFLAGS="$(AMD64_CFLAGS)" \
+ CPPFLAGS="$(AMD64_CFLAGS)" \
LDFLAGS="$(AMD64_LDFLAGS)" \
../configure --enable-win64 $(CONFIGOPTS) \
--prefix=/usr \
Nur in wine-unstable-1.1.36/debian: rules~.
Reply to: