summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2013-11-26 12:58:31 -0500
committerAnand Avati <avati@redhat.com>2013-11-26 11:09:36 -0800
commit7f62ee2432d850f9fa519ddce9f58f9288ceee29 (patch)
tree368a174377c2ae7f977d2e9d56bec2056977e4b3 /configure.ac
parent21f7ad207bdb8ddf549aa65cafc1ad95e261ec3d (diff)
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 <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/6362 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 12 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index ae4046c298d..5cc87d1aaef 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)