From 395c88051efb4b84f752be4eea1b34b13c80a1dc Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Thu, 6 Nov 2014 00:01:09 +0100 Subject: [PATCH] subversion: ensure --disable-debug doesn't mangle CFLAGS Fixes: http://autobuild.buildroot.net/results/fc6/fc69a19c66462585449f7c4dad174d45a84e4947/ http://autobuild.buildroot.net/results/e04/e0471f2a9087d547840a7b18863289963e357b57/ http://autobuild.buildroot.net/results/bd8/bd8cdf976937c7b9029658871929f4be464b7a47/ http://autobuild.buildroot.net/results/652/652c3afe844e912061fbc5991e6fecad98ff6e6f/ And many more. When --disable-debug is passed to configure, as is automatically done by the autotools infrastructure since 822a757456e (infra: Move --enable/--disable-debug to package/Makefile.in), the configure script will try to strip debugging (-g) options from the C/CXXFLAGS. The logic to do so is unfortunately buggy, so it ends up mangling options like -mfloat-gprs=double that we use on certain PowerPC variants, breaking the build. Fix it by adjusting the sed regexp to be more selective in what it strips. The package unfortunately doesn't cleanly autoreconf, so configure is patched instead of configure.ac. Signed-off-by: Peter Korsgaard --- .../subversion/0001-dont-mangle-cflags.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/subversion/0001-dont-mangle-cflags.patch diff --git a/package/subversion/0001-dont-mangle-cflags.patch b/package/subversion/0001-dont-mangle-cflags.patch new file mode 100644 index 0000000000..33370c549e --- /dev/null +++ b/package/subversion/0001-dont-mangle-cflags.patch @@ -0,0 +1,28 @@ +[PATCH] configure: don't mangle CFLAGS + +Ensure that the sed expression to strip debugging options from CFLAGS +doesn't mangle flags like -mfloat-gprs=double, breaking the build. + +Patch configure instead of configure.ac as subversion currently doesn't +cleanly autoreconf. + +Signed-off-by: Peter Korsgaard +--- + configure | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: subversion-1.7.18/configure +=================================================================== +--- subversion-1.7.18.orig/configure ++++ subversion-1.7.18/configure +@@ -19798,8 +19798,8 @@ + CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG" + CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG" + elif test "$enable_debugging" = "no" ; then +- CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' | $SED -e 's/-g//g'`" +- CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' | $SED -e 's/-g//g'`" ++ CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-g[0-9]* //g'`" ++ CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9]* //g'`" + CFLAGS="$CFLAGS -DNDEBUG" + CXXFLAGS="$CXXFLAGS -DNDEBUG" + # elif test "$enable_debugging" = "maybe" ; then -- 2.30.2