Mercurial > hg > dhcpcd
changeset 2165:f65d8c155be4 draft
Fix debug options and default CFLAGS
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Wed, 27 Nov 2013 21:14:19 +0000 |
| parents | 0fd673c9feb5 |
| children | e3224a33d655 |
| files | configure |
| diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Wed Nov 27 20:21:17 2013 +0000 +++ b/configure Wed Nov 27 21:14:19 2013 +0000 @@ -267,16 +267,16 @@ # 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 @@ 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 @@ 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
