[Glibc-bsd-commits] r6044 - trunk/freebsd-libs/debian
stevenc-guest at alioth.debian.org
stevenc-guest at alioth.debian.org
Fri May 6 12:36:43 UTC 2016
Author: stevenc-guest
Date: 2016-05-06 12:36:42 +0000 (Fri, 06 May 2016)
New Revision: 6044
Modified:
trunk/freebsd-libs/debian/changelog
trunk/freebsd-libs/debian/control
trunk/freebsd-libs/debian/rules
Log:
* Add Build-Depends: dpkg-dev (>= 1.16.1.1) and use buildflags.mk
to set CFLAGS, respecting DEB_BUILD_OPTIONS flags such as noopt
* Enable hardening=+all, which includes PIE, relro and stack protector
Modified: trunk/freebsd-libs/debian/changelog
===================================================================
--- trunk/freebsd-libs/debian/changelog 2016-05-06 12:25:47 UTC (rev 6043)
+++ trunk/freebsd-libs/debian/changelog 2016-05-06 12:36:42 UTC (rev 6044)
@@ -4,6 +4,9 @@
kfreebsd-specific
* Now using debhelper compat v9
* Now using Standards-Version 3.9.8 (no changes needed).
+ * Add Build-Depends: dpkg-dev (>= 1.16.1.1) and use buildflags.mk
+ to set CFLAGS, respecting DEB_BUILD_OPTIONS flags such as noopt
+ * Enable hardening=+all, which includes PIE, relro and stack protector
-- Steven Chamberlain <steven at pyro.eu.org> Fri, 06 May 2016 12:23:46 +0100
Modified: trunk/freebsd-libs/debian/control
===================================================================
--- trunk/freebsd-libs/debian/control 2016-05-06 12:25:47 UTC (rev 6043)
+++ trunk/freebsd-libs/debian/control 2016-05-06 12:36:42 UTC (rev 6044)
@@ -8,6 +8,7 @@
Christoph Egger <christoph at debian.org>,
Steven Chamberlain <steven at pyro.eu.org>,
Build-Depends: debhelper (>= 9), pkg-config,
+ dpkg-dev (>= 1.16.1.1),
bmake (>= 20131001-4~),
m4,
freebsd-mk (>= 10.3~),
Modified: trunk/freebsd-libs/debian/rules
===================================================================
--- trunk/freebsd-libs/debian/rules 2016-05-06 12:25:47 UTC (rev 6043)
+++ trunk/freebsd-libs/debian/rules 2016-05-06 12:36:42 UTC (rev 6044)
@@ -25,17 +25,19 @@
major := $(shell echo $(version) | sed -e 's/\..*//g')
revision := $(shell echo $(full_version) | sed -e 's/^[^+-]*//g')
-CFLAGS = -Wall -g -pipe -fPIC -I. -I$(CURDIR)/sys -D_GNU_SOURCE \
+# Use hardening flags
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# Pre-define CFLAGS, for hardening, debug and optimisation level
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+CFLAGS += \
+ -Wall -pipe -fPIC -I. -I$(CURDIR)/sys -D_GNU_SOURCE \
-D__FreeBSD_version=__FreeBSD_kernel_version \
- -I/usr/include/freebsd \
- -Werror=implicit-function-declaration
+ -I/usr/include/freebsd \
+ -Werror=implicit-function-declaration
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
More information about the Glibc-bsd-commits
mailing list