Source: freeciv 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 freeciv-2.3.0.orig/debian/rules freeciv-2.3.0/debian/rules --- freeciv-2.3.0.orig/debian/rules 2011-08-29 04:41:05.000000000 +0200 +++ freeciv-2.3.0/debian/rules 2012-01-05 22:28:12.000000000 +0100 @@ -21,12 +21,10 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -CFLAGS = -Wall -g -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif +CFLAGS = `dpkg-buildflags --get CFLAGS` +CFLAGS += -Wall +LDFLAGS = `dpkg-buildflags --get LDFLAGS` +CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` COMMON_CONFIG := --cache-file=$(CURDIR)/config.cache \ --sysconfdir=/etc --prefix=/usr \ @@ -45,7 +43,7 @@ ln -sf /usr/share/misc/config.guess bootstrap/config.guess mkdir build-server - (cd build-server && ../configure $(COMMON_CONFIG) --disable-client \ + (cd build-server && ../configure CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(COMMON_CONFIG) --disable-client \ --without-ggz-client && \ $(MAKE) CFLAGS="$(CFLAGS)") @@ -60,7 +58,7 @@ mkdir build-xaw3d (cd build-xaw3d && \ - ../configure $(COMMON_CONFIG) --disable-server --enable-client=xaw \ + ../configure CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(COMMON_CONFIG) --disable-server --enable-client=xaw \ --with-xaw3d --without-ggz-client --without-ggz-server && \ $(MAKE) CFLAGS="$(CFLAGS)") @@ -75,7 +73,7 @@ mkdir build-gtk (cd build-gtk && \ - ../configure $(COMMON_CONFIG) --disable-server --enable-client=gtk-2.0 \ + ../configure CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(COMMON_CONFIG) --disable-server --enable-client=gtk-2.0 \ --without-ggz-server --enable-noregistry && \ $(MAKE) CFLAGS="$(CFLAGS)") @@ -90,7 +88,7 @@ mkdir build-sdl (cd build-sdl && \ - ../configure $(COMMON_CONFIG) --disable-server --enable-client=sdl \ + ../configure CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(COMMON_CONFIG) --disable-server --enable-client=sdl \ --without-ggz-client --without-ggz-server && \ $(MAKE) CFLAGS="$(CFLAGS)") Nur in freeciv-2.3.0/debian: rules~.