summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-11-27 21:14:19 +0000
committerRoy Marples <roy@marples.name>2013-11-27 21:14:19 +0000
commit1d762670d21363f13006d36248498fb4c8008b74 (patch)
tree9aab3c43bf3a5fa3deea15fdc4daffa706665497 /configure
parent8e7d8c37a41a0717477b3d009e26dba465a32e77 (diff)
downloaddhcpcd-1d762670d21363f13006d36248498fb4c8008b74.tar.xz
Fix debug options and default CFLAGS
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 5 insertions, 4 deletions
diff --git a/configure b/configure
index f268becd..c14c6ff7 100755
--- a/configure
+++ b/configure
@@ -267,16 +267,16 @@ echo "CC= $CC" >>$CONFIG_MK
# Set to blank, then append user config
# We do this so our SED call to append to XCC remains portable
-echo "CFLAGS=" >>$CONFIG_MK
-echo "CPPFLAGS=" >>$CONFIG_MK
-echo "LDFLAGS=" >>$CONFIG_MK
if [ -n "$CFLAGS" ]; then
+ echo "CFLAGS=" >>$CONFIG_MK
echo "CFLAGS+= $CFLAGS" >>$CONFIG_MK
fi
if [ -n "$CPPFLAGS" ]; then
+ echo "CPPFLAGS=" >>$CONFIG_MK
echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK
fi
if [ -n "$LDFLAGS" ]; then
+ echo "LDFLAGS=" >>$CONFIG_MK
echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK
fi
@@ -290,6 +290,7 @@ done
if [ -n "$DEBUG" -a "$DEBUG" != no -a "$DEBUG" != false ]; then
echo "Enabling memory debugging"
echo "CPPFLAGS+= -DDEBUG_MEMORY" >>$CONFIG_MK
+ echo "CFLAGS+= -ggdb" >>$CONFIG_MK
elif [ -z "$DEBUG" -a -d .git ]; then
printf "Found git ... "
DEBUG=yes
@@ -300,7 +301,7 @@ fi
if [ "$DEBUG" != no -a "$DEBUG" != false ]; then
echo "Adding debugging CFLAGS"
cat <<EOF >>$CONFIG_MK
-CFLAGS+= -ggdb -Wall -Wextra -Wimplicit -Wshadow -Wformat=2
+CFLAGS+= -Wall -Wextra -Wimplicit -Wshadow -Wformat=2
CFLAGS+= -Wmissing-prototypes -Wmissing-declarations
CFLAGS+= -Wmissing-noreturn -Wmissing-format-attribute
CFLAGS+= -Wredundant-decls -Wnested-externs