Package: dhcpcd
Severity: important
Tags: patch
Hi,
please enable hardened build flags. Patch attached.
Cheers,
Moritz
diff -aur dhcpcd-3.2.3.orig/debian/rules dhcpcd-3.2.3/debian/rules
--- dhcpcd-3.2.3.orig/debian/rules 2014-01-05 15:13:05.000000000 +0100
+++ dhcpcd-3.2.3/debian/rules 2014-01-05 15:17:30.924516714 +0100
@@ -7,12 +7,9 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-# policy manual, section 10.1
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- COPTS = -g -O0 -Wall -W -DENABLE_INFO_COMPAT
-else
- COPTS = -g -O2 -Wall -W -DENABLE_INFO_COMPAT
-endif
+# dpkg-buildflags automatically uses noopt
+COPTS = `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS` -Wall -W -DENABLE_INFO_COMPAT
+LOPTS = `dpkg-buildflags --get LDFLAGS`
configure-stamp:
@@ -21,7 +18,7 @@
build: configure-stamp
dh_testdir
- $(MAKE) COPTS="$(COPTS)"
+ $(MAKE) COPTS="$(COPTS)" LOPTS="$(LOPTS)"
touch build-stamp
clean:
Nur in dhcpcd-3.2.3/debian: rules~.
diff -aur dhcpcd-3.2.3.orig/Makefile dhcpcd-3.2.3/Makefile
--- dhcpcd-3.2.3.orig/Makefile 2014-01-05 15:13:05.000000000 +0100
+++ dhcpcd-3.2.3/Makefile 2014-01-05 15:17:09.628929820 +0100
@@ -22,7 +22,7 @@
# os.mk should define this, but heh
INFOD?= /var/db
-LDADD+= ${LIBRESOLV} ${LIBRT}
+LDADD+= ${LIBRESOLV} ${LIBRT} ${LOPTS}
CFLAGS+= -DINFODIR=\"${INFOD}\" ${FORK} ${RC}
CFLAGS+= ${COPTS}
Nur in dhcpcd-3.2.3: Makefile~.