Package: gravitywars / 1.102-34

040_hardening.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Markus Koschany <apo@debian.org>
Date: Sat, 21 Nov 2015 20:56:21 +0100
Subject: hardening

Build the game with hardening build flags.
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index bfc9e71..3becd57 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ DEBUG=1
 BINDIR=/usr/local/bin
 
 ifeq (1,$(USE_SDL))
-CFLAGS= -g -Wall -DUSE_SDL -DUSE_JOYSTICK `sdl-config --cflags`
+CFLAGS= -g -Wall -O2 -fstack-protector-strong -Wformat -Werror=format-security -DUSE_SDL -DUSE_JOYSTICK `sdl-config --cflags`
 LIBS= -lm `sdl-config --libs`
 else
 CFLAGS= -O2 -Wall
@@ -23,7 +23,7 @@ OBJECTS=memory.o macros.o misc.o water.o score.o hole.o bullet.o pixel.o \
         control.o vgastubs.o GravityWars101.o 
 
 $(TARGET): $(OBJECTS)
-	$(CC) $(CFLAGS) $(OBJECTS) $(OBJECTS2) -o $(TARGET) $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(OBJECTS2) -o $(TARGET) $(LIBS)
 
 GravityWars101.o: GravityWars101.c config.h macros.h