From 7f62ee2432d850f9fa519ddce9f58f9288ceee29 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Tue, 26 Nov 2013 12:58:31 -0500 Subject: Fix CFLAGS handling with enable_debug. The value was getting stomped by the Python stuff (for glupy) after we had supposedly dealt with enable_debug, so we were getting stray -O2 options that hamper debugging. Change-Id: Iacd616071c83b92018b597b6144ab565bd5fc66f Signed-off-by: Jeff Darcy Reviewed-on: http://review.gluster.org/6362 Reviewed-by: Kaleb KEITHLEY Tested-by: Gluster Build System Reviewed-by: Anand Avati --- configure.ac | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index ae4046c29..5cc87d1aa 100644 --- a/configure.ac +++ b/configure.ac @@ -751,16 +751,6 @@ AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [Enable debug build options.])) -BUILD_DEBUG=no -if test "x$enable_debug" = "xyes"; then - BUILD_DEBUG=yes - CFLAGS=`echo $CFLAGS | sed -e s/O2/O0/` -else - BUILD_DEBUG=no -fi -AC_SUBST(CFLAGS) -# end enable debug section - # syslog section AC_ARG_ENABLE([syslog], AC_HELP_STRING([--disable-syslog], @@ -858,6 +848,18 @@ if test "x$BUILD_GLUPY" = "xyes"; then fi # end glupy section +# Other stuff (most notably the glupy section) might have injected another -O2 +# into CFLAGS, so *do this last*. +BUILD_DEBUG=no +if test "x$enable_debug" = "xyes"; then + BUILD_DEBUG=yes + CFLAGS=`echo $CFLAGS | sed -e s/O2/O0/g` +else + BUILD_DEBUG=no +fi +AC_SUBST(CFLAGS) +# end enable debug section + AC_SUBST(GF_HOST_OS) AC_SUBST([GF_GLUSTERFS_LIBS]) AC_SUBST(GF_GLUSTERFS_CFLAGS) -- cgit