Bug#667555: Please enable hardened build flags

2012-04-05 Thread Frederic Peters
Hi Moritz,

Moritz Muehlenhoff wrote:
 Source: lasso
 Version: 2.3.6-2
 Severity: important
 Tags: patch

 Please enable hardened build flags through dpkg-buildflags.
 
 Patch attached. (dpkg-buildflags abides noopt from DEB_BUILD_OPTIONS)

There's no patch attached :/

 Note, that this patch doesn't cover passing the hardened build
 flags to the Perl module: For details on how to achieve this, please
 see #662666.

Thanks for the pointer.


Fred



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#667555: Please enable hardened build flags

2012-04-05 Thread Moritz Mühlenhoff
On Thu, Apr 05, 2012 at 09:53:10AM +0200, Frederic Peters wrote:
 Hi Moritz,
 
 Moritz Muehlenhoff wrote:
  Source: lasso
  Version: 2.3.6-2
  Severity: important
  Tags: patch
 
  Please enable hardened build flags through dpkg-buildflags.
  
  Patch attached. (dpkg-buildflags abides noopt from DEB_BUILD_OPTIONS)
 
 There's no patch attached :/

Doh! Now really attached.

Cheers,
Moritz
diff -aur lasso-2.3.6.harden/debian/rules lasso-2.3.6/debian/rules
--- lasso-2.3.6.harden/debian/rules	2012-04-04 23:12:30.0 +0200
+++ lasso-2.3.6/debian/rules	2012-04-04 23:12:15.0 +0200
@@ -28,13 +28,11 @@
 PYVERS		:= $(shell pyversions -vr debian/control)
 OTHERPYVERS	:= $(filter-out $(PYDEF), $(PYVERS))
 
-CFLAGS = -Wall -g
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+CFLAGS += -Wall
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 endif
@@ -66,7 +64,7 @@
 config.status: configure
 	dh_testdir
 	# Add here commands to configure the package.
-	CFLAGS=$(CFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) $(CONFIGURE_ARGS)
+	CFLAGS=$(CFLAGS) CPPFLAGS=$(CPPFLAGS) LDFLAGS=$(LDFLAGS) ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) $(CONFIGURE_ARGS)
 
 
 build: build-stamp
Nur in lasso-2.3.6/debian: rules~.


Bug#667555: Please enable hardened build flags

2012-04-04 Thread Moritz Muehlenhoff
Source: lasso
Version: 2.3.6-2
Severity: important
Tags: patch

Please enable hardened build flags through dpkg-buildflags.

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

Note, that this patch doesn't cover passing the hardened build
flags to the Perl module: For details on how to achieve this, please
see #662666.

Cheers,
Moritz



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org