laforge submitted this change.
Revert `configure: regular_C(PP)FLAGS -> C(PP)FLAGS`
This commit reverts dd335ef8fc41567e324a3d26f1ec30d04c69a0bb.
Observed:
```
$ configure && make CPPFLAGS=-DNDEBUG
gcc -DHAVE_CONFIG_H -I. -I.. -DNDEBUG -I../include -I/usr/include/libmnl -DNDEBUG -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wshadow -Wstrict-prototypes -Wformat=2 -pipe -std=gnu11 -fvisibility=hidden -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wshadow -Wstrict-prototypes -Wformat=2 -pipe -std=gnu11 -MT gtp-tunnel.o -MD -MP -MF $depbase.Tpo -c -o gtp-tunnel.o gtp-tunnel.c &&\
```
Expected:
```
gcc -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I../include -I/usr/include/libmnl -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wshadow -Wstrict-prototypes -Wformat=2 -pipe -std=gnu11 -fvisibility=hidden -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wshadow -Wstrict-prototypes -Wformat=2 -pipe -std=gnu11 -MT gtp-tunnel.o -MD -MP -MF $depbase.Tpo -c -o gtp-tunnel.o gtp-tunnel.c &&\
```
Including ${CFLAGS} in AM_CFLAGS (which is totally wrong)
is the cause for the double apperance of -DNDEBUG.
_FILE_OFFSET_BITS is lost because dd335 violated one core principle
of autoconf/automake: configure MUST run idempotent and not touch
CPPFLAGS and CFLAGS, pursuant to automake.info ยง3.6 "User variables".
Change-Id: I5cc30885cec564346997269b51decbbe49548ddf
---
M Make_global.am
M configure.ac
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Make_global.am b/Make_global.am
index 9a3d5b2..f2cb36c 100644
--- a/Make_global.am
+++ b/Make_global.am
@@ -1,2 +1,2 @@
-AM_CPPFLAGS = ${CPPFLAGS} -I${top_srcdir}/include ${LIBMNL_CFLAGS}
-AM_CFLAGS = ${CFLAGS} ${GCC_FVISIBILITY_HIDDEN}
+AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_srcdir}/include ${LIBMNL_CFLAGS}
+AM_CFLAGS = ${regular_CFLAGS} ${GCC_FVISIBILITY_HIDDEN}
diff --git a/configure.ac b/configure.ac
index 90e4dce..6eabd32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,8 +9,8 @@
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign tar-pax no-dist-gzip dist-bzip2 1.6 subdir-objects])
-CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT"
-CFLAGS="$CFLAGS -Wall -Waggregate-return -Wmissing-declarations \
+regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT"
+regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
-Wmissing-prototypes -Wshadow -Wstrict-prototypes \
-Wformat=2 -pipe"
@@ -55,8 +55,8 @@
[sanitize=$enableval], [sanitize="no"])
if test x"$sanitize" = x"yes"
then
- CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
- CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
+ regular_CFLAGS="-fsanitize=address -fsanitize=undefined"
+ regular_CPPFLAGS="-fsanitize=address -fsanitize=undefined"
fi
AC_ARG_ENABLE(werror,
@@ -74,8 +74,8 @@
WERROR_FLAGS+=" -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definition"
WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
- CFLAGS="$CFLAGS $WERROR_FLAGS"
- CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
+ regular_CFLAGS="$WERROR_FLAGS"
+ regular_CPPFLAGS="$WERROR_FLAGS"
fi
AC_ARG_ENABLE(qemu_tests,
@@ -91,8 +91,8 @@
AC_MSG_ERROR([missing programs for --enable-qemu-tests])
fi
-AC_SUBST([CPPFLAGS])
-AC_SUBST([CFLAGS])
+AC_SUBST([regular_CPPFLAGS])
+AC_SUBST([regular_CFLAGS])
AC_CONFIG_FILES([
Makefile
include/Makefile
To view, visit change 38473. To unsubscribe, or for help writing mail filters, visit settings.