aboutsummaryrefslogtreecommitdiff
path: root/package/aircrack-ng/0001-stack-protector.patch
blob: 5f2bd1b18fc19e0c125827bf95692b8d7c412493 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Added option to disable stack-protector support auto-detection in gcc.

Downloaded from upstream commit:
http://trac.aircrack-ng.org/changeset/2889/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Index: /trunk/INSTALLING
===================================================================
--- trunk/INSTALLING	(revision 2888)
+++ trunk/INSTALLING	(revision 2889)
@@ -83,4 +83,6 @@
 * macport:  Set this flag to true to compile on OS X with macports.
 
+* stackprotector: Allows to enable/disable auto-detection of stack-protector support in gcc
+
 Example:
 
Index: /trunk/common.mak
===================================================================
--- trunk/common.mak	(revision 2888)
+++ trunk/common.mak	(revision 2889)
@@ -64,4 +64,13 @@
 ifeq ($(PCRE), true)
 COMMON_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpcre) -DHAVE_PCRE
+endif
+
+STACK_PROTECTOR	= true
+ifeq ($(stackprotector), false)
+	STACK_PROTECTOR	= false
+endif
+
+ifeq ($(STACKPROTECTOR), false)
+	STACK_PROTECTOR	= false
 endif
 
@@ -235,12 +244,14 @@
 endif
 
-ifeq ($(GCC_OVER49), 0)
-	ifeq ($(GCC_OVER41), 1)
-		COMMON_CFLAGS += -fstack-protector
+ifeq ($(STACK_PROTECTOR), true)
+	ifeq ($(GCC_OVER49), 0)
+		ifeq ($(GCC_OVER41), 1)
+			COMMON_CFLAGS += -fstack-protector
+		endif
 	endif
-endif
-
-ifeq ($(GCC_OVER49), 1)
-	COMMON_CFLAGS += -fstack-protector-strong
+
+	ifeq ($(GCC_OVER49), 1)
+		COMMON_CFLAGS += -fstack-protector-strong
+	endif
 endif