Ensure that the sed expression to strip debugging options from CFLAGS
doesn't mangle flags like -mfloat-gprs=double, breaking the build.

Patch by: Peter Korsgaard and Vicente Olivert Riera
(See 
https://git.buildroot.net/buildroot/tree/package/subversion/0001-dont-mangle-cflags.patch?h=2020.08)
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index f1b2a9929e..dd0680cfb2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1110,8 +1110,8 @@ if test "$enable_debugging" = "yes" ; then
   CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG"
 elif test "$enable_debugging" = "no" ; then
   AC_MSG_NOTICE([Disabling debugging])
-  CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
-  CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
+  CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9]* //g'`"]
+  CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9]* //g'`"]
   dnl Compile with NDEBUG to get rid of assertions
   CFLAGS="$CFLAGS -DNDEBUG"
   CXXFLAGS="$CXXFLAGS -DNDEBUG"
-- 
2.28.0

Reply via email to