1*4882a593SmuzhiyunFrom 18ace560a15207503805d4df25b90c7a756bcbf6 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3*4882a593SmuzhiyunDate: Tue, 2 Feb 2021 23:53:39 +0100
4*4882a593SmuzhiyunSubject: [PATCH] configure.ac: put back --disable-stack-protector
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunPut back --disable-stack-protector which has been removed by commit
7*4882a593Smuzhiyun70c85915eace83142b84e4f65f5db421cf0c09e3. This will allow the user to
8*4882a593Smuzhiyundisable it or to let a higher buildsystem such as buildroot to finely
9*4882a593Smuzhiyunconfigure it.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunIndeed, without this patch, build can fail as some compilers (such as
12*4882a593Smuzhiyunuclibc) could missed the needed library (-lssp or -lssp_nonshared) at
13*4882a593Smuzhiyunlinking step:
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun  CCLD     libsox.la
16*4882a593Smuzhiyun/home/fabrice/br-test-pkg/br-arm-full/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/5.5.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp_nonshared
17*4882a593Smuzhiyun/home/fabrice/br-test-pkg/br-arm-full/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/5.5.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -lssp
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
20*4882a593Smuzhiyun[Upstream status: https://sourceforge.net/p/sox/patches/122/]
21*4882a593Smuzhiyun---
22*4882a593Smuzhiyun configure.ac | 7 ++++++-
23*4882a593Smuzhiyun 1 file changed, 6 insertions(+), 1 deletion(-)
24*4882a593Smuzhiyun
25*4882a593Smuzhiyundiff --git a/configure.ac b/configure.ac
26*4882a593Smuzhiyunindex 39306398..a1665467 100644
27*4882a593Smuzhiyun--- a/configure.ac
28*4882a593Smuzhiyun+++ b/configure.ac
29*4882a593Smuzhiyun@@ -32,7 +32,12 @@ AC_PROG_LN_S
30*4882a593Smuzhiyun PKG_PROG_PKG_CONFIG
31*4882a593Smuzhiyun PKG_INSTALLDIR
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun-AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])
34*4882a593Smuzhiyun+AC_ARG_ENABLE([stack-protector],
35*4882a593Smuzhiyun+    AS_HELP_STRING([--disable-stack-protector], [Disable -fstack-protector-strong]),
36*4882a593Smuzhiyun+    [enable_stack_protector=$enableval], [enable_stack_protector=yes])
37*4882a593Smuzhiyun+AS_IF([test x"$enable_stack_protector" = "xyes"],
38*4882a593Smuzhiyun+    [AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])])
39*4882a593Smuzhiyun+
40*4882a593Smuzhiyun AX_APPEND_COMPILE_FLAGS([-Wall -Wmissing-prototypes -Wstrict-prototypes])
41*4882a593Smuzhiyun AX_APPEND_LINK_FLAGS([-Wl,--as-needed])
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun--
44*4882a593Smuzhiyun2.29.2
45*4882a593Smuzhiyun
46