blob: 4888869ec6216252da4c6cb08dc4684dcc32568f (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Patrick Meyer <git@the-space.agency>
Date: Thu, 28 Apr 2022 01:50:11 +0000
Subject: [PATCH] Disable SSP
Co-Authored-By: Yonatan Goldschmidt <yon.goldschmidt@gmail.com>
---
configure | 46 ----------------------------------------------
configure.ac | 17 +----------------
2 files changed, 1 insertion(+), 62 deletions(-)
diff --git a/configure b/configure
index 8374714..8c9eb9a 100755
--- a/configure
+++ b/configure
@@ -3381,53 +3381,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi # non-static
- # stack protector. -strong is good but only in gcc 4.9 or later
- OLDCFLAGS="$CFLAGS"
- TESTFLAGS="-fstack-protector-strong"
- CFLAGS="$CFLAGS $TESTFLAGS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: Setting $TESTFLAGS" >&5
-$as_echo "$as_me: Setting $TESTFLAGS" >&6;}
-else
-
- CFLAGS="$OLDCFLAGS"
- TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4"
- CFLAGS="$CFLAGS $TESTFLAGS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: Setting $TESTFLAGS" >&5
-$as_echo "$as_me: Setting $TESTFLAGS" >&6;}
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: Not setting $TESTFLAGS" >&5
-$as_echo "$as_me: Not setting $TESTFLAGS" >&6;}; CFLAGS="$OLDCFLAGS"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# FORTIFY_SOURCE
{
OLDFLAGS="$CFLAGS"
diff --git a/configure.ac b/configure.ac
index 6a19479..28cd987 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,22 +103,7 @@ if test "$hardenbuild" -eq 1; then
[AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ]
)
fi # non-static
- # stack protector. -strong is good but only in gcc 4.9 or later
- OLDCFLAGS="$CFLAGS"
- TESTFLAGS="-fstack-protector-strong"
- CFLAGS="$CFLAGS $TESTFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
- [
- CFLAGS="$OLDCFLAGS"
- TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4"
- CFLAGS="$CFLAGS $TESTFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
- [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDCFLAGS" ]
- )
- ]
- )
+
# FORTIFY_SOURCE
DB_TRYADDCFLAGS([-D_FORTIFY_SOURCE=2])
|