[lrslib] 10/12: add hardening flags
David Bremner
bremner at debian.org
Sun Aug 11 12:16:03 UTC 2013
This is an automated email from the git hooks/post-receive script.
bremner pushed a commit to branch master
in repository lrslib.
commit 2eb220e0a0ad9d04cb7c5275838261fd286f82a1
Author: David Bremner <bremner at debian.org>
Date: Sun Aug 11 13:28:30 2013 +0200
add hardening flags
technically we rely on dpkg-buildflags exporting the right things.
---
debian/Makefile.debian | 10 +++++++---
debian/changelog | 3 ++-
debian/rules | 5 +++++
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/debian/Makefile.debian b/debian/Makefile.debian
index 524e637..8f473f5 100644
--- a/debian/Makefile.debian
+++ b/debian/Makefile.debian
@@ -1,7 +1,11 @@
CC=gcc
-CPPFLAGS= -DLRS_QUIET -DTIMES -DSIGNALS -DGMP
-LDFLAGS = -L. -llrs -lgmp
+CPPFLAGS+= -DLRS_QUIET -DTIMES -DSIGNALS -DGMP
+
+# these two lines need to be in this order
+
+SHLIBFLAGS:=$(LDFLAGS) -lgmp
+LDFLAGS := $(LDFLAGS) -L. -llrs -lgmp
# static library
LIBOBJ= lrslib.o lrsgmp.o
@@ -12,7 +16,7 @@ SONAME ?=liblrs.so.0
SOMINOR ?=.0.0
SHLIB ?=$(SONAME)$(SOMINOR)
SHLINK ?=liblrs.so
-SHLIBFLAGS=-lgmp
+
%.sho: %.c
${CC} -c -fPIC ${CPPFLAGS} ${CFLAGS} -o $@ $<
diff --git a/debian/changelog b/debian/changelog
index b799418..1b3a630 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
lrslib (0.43-1) unstable; urgency=low
* New upstream release
+ * Enable hardening flags
- -- David Bremner <bremner at debian.org> Sun, 11 Aug 2013 11:18:05 +0200
+ -- David Bremner <bremner at debian.org> Sun, 11 Aug 2013 13:41:23 +0200
lrslib (0.42c-1) unstable; urgency=low
diff --git a/debian/rules b/debian/rules
index cfa52de..4a656b9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,11 @@ DOCBASEURL=http://cgm.cs.mcgill.ca/%7Eavis/C/lrslib/USERGUIDE.html
DB2MAN=/usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl
XP=xsltproc --nonet
+CFLAGS=$(shell dpkg-buildflags --get CFGLAGS)
+CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
+export CFLAGS CPPFLAGS LDFLAGS
+
override_dh_auto_build: lrslib.1 nash.1
make -f debian/Makefile.debian SONAME=$(SONAME) SOMINOR=$(SOMINOR) SHLIB=$(SONAME)$(SOMINOR) \
DESTDIR=$(CURDIR)/debian/tmp all
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lrslib.git
More information about the debian-science-commits
mailing list