On 10.09.2020 05:41, Branko Čibej wrote: > On 09.09.2020 23:34, Fabrice Fontaine wrote: >> 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" > > There is no functional change in your patch, and the original > expressions will not mangle '-mfloat-gprs=double' because the patterns > contain a trailing space. > > I'm confused.
$ echo '-mfloat-gprs=double ' | sed -e 's/-g[0-9] //g' -e 's/-g //g' -mfloat-gprs=double > -- Brane