2
1

0002-configure.ac-put-back-disable-stack-protector.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 18ace560a15207503805d4df25b90c7a756bcbf6 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Tue, 2 Feb 2021 23:53:39 +0100
  4. Subject: [PATCH] configure.ac: put back --disable-stack-protector
  5. Put back --disable-stack-protector which has been removed by commit
  6. 70c85915eace83142b84e4f65f5db421cf0c09e3. This will allow the user to
  7. disable it or to let a higher buildsystem such as buildroot to finely
  8. configure it.
  9. Indeed, without this patch, build can fail as some compilers (such as
  10. uclibc) could missed the needed library (-lssp or -lssp_nonshared) at
  11. linking step:
  12. CCLD libsox.la
  13. /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
  14. /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
  15. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  16. [Upstream status: https://sourceforge.net/p/sox/patches/122/]
  17. ---
  18. configure.ac | 7 ++++++-
  19. 1 file changed, 6 insertions(+), 1 deletion(-)
  20. diff --git a/configure.ac b/configure.ac
  21. index 39306398..a1665467 100644
  22. --- a/configure.ac
  23. +++ b/configure.ac
  24. @@ -32,7 +32,12 @@ AC_PROG_LN_S
  25. PKG_PROG_PKG_CONFIG
  26. PKG_INSTALLDIR
  27. -AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])
  28. +AC_ARG_ENABLE([stack-protector],
  29. + AS_HELP_STRING([--disable-stack-protector], [Disable -fstack-protector-strong]),
  30. + [enable_stack_protector=$enableval], [enable_stack_protector=yes])
  31. +AS_IF([test x"$enable_stack_protector" = "xyes"],
  32. + [AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])])
  33. +
  34. AX_APPEND_COMPILE_FLAGS([-Wall -Wmissing-prototypes -Wstrict-prototypes])
  35. AX_APPEND_LINK_FLAGS([-Wl,--as-needed])
  36. --
  37. 2.29.2