summaryrefslogtreecommitdiff
path: root/user/gnucobol/keep-debug-flags.patch
blob: 625a5002bb24508a4806277bb3a015f76abceff1 (plain) (blame)
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
--- gnucobol-3.1.2/configure.ac	2020-12-23 05:51:14.000000000 -0500
+++ gnucobol-3.1.2/configure.ac	2021-05-03 02:35:16.051807283 -0400
@@ -1854,59 +1854,6 @@ if test "$COB_USES_CLANG_ONLY" = "yes";
 fi
 
 
-# Include CFLAGS / CPPFLAGS in COB_CFLAGS without optimization/debug options.
-
-if test "x$CFLAGS" != "x"; then
-	cob_temp_flags="$CFLAGS"
-else
-	cob_temp_flags=""
-fi
-if test "x$CPPFLAGS" != "x"; then
-	if test "x$cob_temp_flags" != "x"; then
-		cob_temp_flags="$CPPFLAGS $cob_temp_flags"
-	else
-		cob_temp_flags="$CPPFLAGS"
-	fi
-fi
-
-#
-# Add CFLAGS and CPPFLAGS to COB_CFLAGS, minus optimization/debug options.
-
-cob_temp_flags="$CFLAGS $CPPFLAGS"
-
-if test "$enable_hardening" = no; then
-	cob_temp_flags=$(echo x$cob_temp_flags |		\
-	 sed -e 's/^x//'				\
- 	     -e 's/-Wp,-D_FORTIFY_SOURCE=.//g'		\
- 	     -e 's/-D_FORTIFY_SOURCE=.//g'		\
- 	     -e 's/-fmessage-length=0//g'		\
- 	     -e 's/-fstack-protector-strong//g'		\
- 	     -e 's/-fstack-protector-all//g'		\
- 	     -e 's/-fstack-protector//g'		\
-	     )
-fi
-
-cob_temp_flags=$(echo x$cob_temp_flags |		\
-	 sed -e 's/^x//'				\
-	     -e 's/-g\(db\)\{0,1\}[[0-9 ]]//g'				\
-	     -e 's/-g\(db\)\{0,1\}$//'				\
-	     -e 's/[[+-]]O[[0-9s]]*//g'			\
- 	     -e 's/-O//g'				\
- 	     -e 's/-funwind-tables//g'			\
- 	     -e 's/-fasynchronous-unwind-tables//g'	\
- 	     -e 's/  / /g'	\
- 	     -e 's/ $//g'	\
-	     )
-
-if test "x$cob_temp_flags" != "x"; then
-	COB_CFLAGS="$cob_temp_flags $COB_CFLAGS"
-fi
-if test "$enable_hardening" = "yes"; then
-	# needs optimization
-	COB_CFLAGS="$COB_CFLAGS -O"
-fi
-unset cob_temp_flags
-
 # Special stuff
 
 AH_VERBATIM([_XOPEN_SOURCE_EXTENDED],