From a63f1fd6a9a9b5d574d83025bd4882f1ae1cd722 Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Mon, 1 Nov 2010 21:30:56 +0100 Subject: [PATCH] * debian/rules: - pick {C,LD}FLAGS from dpkg-buildflags. - add -Wl,-z,defs -Wl,--as-needed to LDFLAGS. - add hardening flags to {C,LD}FLAGS. --- debian/changelog | 6 +++++- debian/control | 3 ++- debian/rules | 12 +++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 640e685c..564c5496 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,12 @@ midori (0.2.8-1) UNRELEASED; urgency=low * New upstream release. * debian/control: - add myself to uploaders. + * debian/rules: + - pick {C,LD}FLAGS from dpkg-buildflags. + - add -Wl,-z,defs -Wl,--as-needed to LDFLAGS. + - add hardening flags to {C,LD}FLAGS. - -- Yves-Alexis Perez Mon, 20 Sep 2010 23:34:56 +0200 + -- Yves-Alexis Perez Mon, 18 Oct 2010 11:26:48 +0200 midori (0.2.7-1.1) unstable; urgency=low diff --git a/debian/control b/debian/control index bcf88f26..a409a6d2 100644 --- a/debian/control +++ b/debian/control @@ -25,7 +25,8 @@ Build-Depends: debhelper (>= 7.0.50), # For testing under xvfb: xvfb, xauth, - xfonts-base + xfonts-base, + hardening-includes # Disabled optional dependencies: Build-Conflicts: gtk-doc-tools, libgtksourceview2.0-dev (>= 2.0), diff --git a/debian/rules b/debian/rules index 88c8b367..27fcdeba 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,15 @@ #!/usr/bin/make -f +LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) +CFLAGS=$(shell dpkg-buildflags --get CFLAGS) +CFLAGS+=$(HARDENING_CFLAGS) +#LDFLAGS+=-Wl,-z,defs -Wl,--as-needed $(HARDENING_LDFLAGS) +LDFLAGS+=-Wl,--as-needed $(HARDENING_LDFLAGS) + +# waf, thank you _so_ much +CCFLAGS=$(CFLAGS) +LINKFLAGS=$(LDFLAGS) + CMD=$(shell echo $@ | sed 's/override_//') LIBWEBKIT_PKG=$(shell dpkg-query -p libwebkit-dev | grep Depends | sed -r 's/.*(libwebkit[^ ]+).*/\1/') @@ -45,7 +55,7 @@ override_dh_auto_configure: $(WAFADMIN_FILE) $(WAF) --nocache configure --prefix /usr override_dh_auto_build: $(WAFADMIN_FILE) - $(WAF) --nocache build --debug full + $(WAF) build --nocache --debug full #override_dh_auto_test: $(WAFADMIN_FILE) # xvfb-run $(WAF) --nocache check -- 2.39.5