Browse Source

Update hardening build

Christoph Biedl 4 years ago
parent
commit
37ec78cdda
2 changed files with 11 additions and 6 deletions
  1. 9 6
      debian/patches/hardening-build.patch
  2. 2 0
      debian/rules

+ 9 - 6
debian/patches/hardening-build.patch

@@ -1,13 +1,16 @@
-Description: Add LDFLAGS to linking phase to enable hardening.
- The Makefile is so simple that it doesn't even contemplate the use of LDFLAGS.
-Author: David Martínez Moreno <ender@debian.org>
+Description: Use all buildflags as provided by dpkg
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
 Forwarded: no
-Last-Update: 2015-07-29
+Last-Update: 2016-12-06
 
 --- a/makefile
 +++ b/makefile
-@@ -13,19 +13,19 @@
- CC = gcc
+@@ -9,23 +9,21 @@
+ mandir = ${sharedir}/man
+ 
+ O=aoe.o bpf.o ${PLATFORM}.o ata.o
+-CFLAGS += -Wall -g -O2
+-CC = gcc
  
  vblade: $O
 -	${CC} -o vblade $O

+ 2 - 0
debian/rules

@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
 DEB_BUILD_ARCH_OS  ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
 ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
 	PLATFORM=freebsd