[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Set our autoconf-breaking options last, not before we check for others



commit 15533c88978a33a7f3c9eda8dbf96463bb6f7dc2
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Jun 1 16:13:41 2016 -0400

    Set our autoconf-breaking options last, not before we check for others
---
 configure.ac | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index f80cb47..5bd35e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1671,15 +1671,6 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then
       CFLAGS="$CFLAGS -Wno-system-headers" ;;
   esac
 
-
-  CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith"
-  CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings"
-  CFLAGS="$CFLAGS -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2"
-  CFLAGS="$CFLAGS -Wwrite-strings -Wmissing-declarations"
-  CFLAGS="$CFLAGS -Wnested-externs -Wbad-function-cast -Wswitch-enum"
-  CFLAGS="$CFLAGS -Waggregate-return -Wpacked -Wunused"
-  CFLAGS="$CFLAGS -Wunused-parameter"
-
   # GCC4.3 users once report trouble with -Wstrict-overflow=5.  GCC5 users
   # have it work better.
   # CFLAGS="$CFLAGS -Wstrict-overflow=1"
@@ -1705,7 +1696,6 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then
      -Wmissing-noreturn
      -Wnormalized=id
      -Wnull-dereference
-     -Wold-style-definition
      -Woverlength-strings
      -Woverride-init
      -Wshift-count-negative
@@ -1727,6 +1717,17 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then
      -Wvariadic-macros
   ], [ TOR_CHECK_CFLAGS([warning_flag]) ])
 
+  CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith"
+  CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings"
+  CFLAGS="$CFLAGS -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2"
+  CFLAGS="$CFLAGS -Wwrite-strings"
+  CFLAGS="$CFLAGS -Wnested-externs -Wbad-function-cast -Wswitch-enum"
+  CFLAGS="$CFLAGS -Waggregate-return -Wpacked -Wunused"
+  CFLAGS="$CFLAGS -Wunused-parameter "
+  # These interfere with building main() { return 0; }, which autoconf
+  # likes to use as its default program.
+  CFLAGS="$CFLAGS -Wold-style-definition -Wmissing-declarations"
+
   if test "$tor_cv_cflags__Wnull_dereference" = "yes"; then
     AC_DEFINE([HAVE_CFLAG_WNULL_DEREFERENCE], 1, [True if we have -Wnull-dereference])
   fi



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits