[rocksndiamonds] 07/09: Enable hardening build flags
Stephen Kitt
skitt at moszumanska.debian.org
Sat Oct 21 21:16:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
skitt pushed a commit to branch master
in repository rocksndiamonds.
commit b432b6dbf7158b2491b61d3d9a768494a5d8c171
Author: Stephen Kitt <skitt at debian.org>
Date: Sat Oct 21 20:26:11 2017 +0200
Enable hardening build flags
---
debian/changelog | 1 +
debian/patches/build-flags.patch | 67 ++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 4 +++
4 files changed, 73 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 6bfd858..6ca27a2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ rocksndiamonds (4.0.1.0+dfsg-1) UNRELEASED; urgency=medium
* Switch to secured upstream URL in debian/watch.
* Change priority to “optional”.
* Fix a couple of spelling mistakes.
+ * Enable hardening build flags.
-- Stephen Kitt <skitt at debian.org> Fri, 20 Oct 2017 21:55:58 +0200
diff --git a/debian/patches/build-flags.patch b/debian/patches/build-flags.patch
new file mode 100644
index 0000000..82847bb
--- /dev/null
+++ b/debian/patches/build-flags.patch
@@ -0,0 +1,67 @@
+Description: Apply external build flags
+Author: Stephen Kitt <skitt at debian.org>
+
+--- a/src/game_em/Makefile
++++ b/src/game_em/Makefile
+@@ -56,7 +56,7 @@
+ $(RANLIB) $(GAME_EM)
+
+ .c.o:
+- $(CC) $(PROFILING) $(CFLAGS) -c $*.c
++ $(CC) $(CPPFLAGS) $(PROFILING) $(CFLAGS) -c $*.c
+
+ clean:
+ $(RM) $(OBJS)
+--- a/src/game_sp/Makefile
++++ b/src/game_sp/Makefile
+@@ -82,7 +82,7 @@
+ $(RANLIB) $(GAME_SP)
+
+ .c.o:
+- $(CC) $(PROFILING) $(CFLAGS) -c $*.c
++ $(CC) $(CPPFLAGS) $(PROFILING) $(CFLAGS) -c $*.c
+
+ clean:
+ $(RM) $(OBJS)
+--- a/src/libgame/Makefile
++++ b/src/libgame/Makefile
+@@ -53,7 +53,7 @@
+ $(RANLIB) $(LIBGAME)
+
+ .c.o:
+- $(CC) $(PROFILING) $(CFLAGS) -c $*.c
++ $(CC) $(CPPFLAGS) $(PROFILING) $(CFLAGS) -c $*.c
+
+ clean:
+ $(RM) $(OBJS)
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -105,7 +105,7 @@
+
+ # OPTIONS = $(DEBUG) -Wall # only for debugging purposes
+ # OPTIONS = $(DEBUG) -O3 -Wall # only for debugging purposes
+-OPTIONS = $(DEBUG) -Wall # only for debugging purposes
++# OPTIONS = $(DEBUG) -Wall # only for debugging purposes
+ # OPTIONS = $(DEBUG) -Wall -ansi -pedantic # only for debugging purposes
+ # OPTIONS = -O3 -Wall -ansi -pedantic
+ # OPTIONS = -O3 -Wall
+@@ -117,8 +117,8 @@
+ OPTIONS = -O3 -Wall
+ endif
+
+-CFLAGS = $(OPTIONS) $(SYS_CFLAGS) $(EXTRA_CFLAGS) $(CONFIG)
+-LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) -lm
++CFLAGS += $(OPTIONS) $(SYS_CFLAGS) $(EXTRA_CFLAGS) $(CONFIG)
++LDFLAGS += $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) -lm
+
+
+ SRCS = main.c \
+@@ -267,7 +267,7 @@
+ echo "$(ICONBASE) ICON $(ICONBASE).ico" | $(WINDRES) -o $(ICON)
+
+ .c.o:
+- $(CC) $(PROFILING) $(CFLAGS) -c $*.c
++ $(CC) $(CPPFLAGS) $(PROFILING) $(CFLAGS) -c $*.c
+
+ graphics_dir:
+ @test -f $(GRAPHICS_DIR)/Makefile && $(MAKE) -C $(GRAPHICS_DIR) || true
diff --git a/debian/patches/series b/debian/patches/series
index 965a000..09d621c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
spelling-fixes.patch
+build-flags.patch
diff --git a/debian/rules b/debian/rules
index 4425f39..a600b34 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,11 @@
#!/usr/bin/make -f
+DPKG_EXPORT_BUILDFLAGS = 1
+export DEB_BUILD_MAINT_OPTIONS=harderning=+all
+
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/dpkg/pkg-info.mk
+include /usr/share/dpkg/buildflags.mk
UPSTREAM_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed 's/+.*//')
LEVEL_DIR := /usr/share/games/rocksndiamonds
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/rocksndiamonds.git
More information about the Pkg-games-commits
mailing list