aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-01 16:13:41 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-11 10:11:53 -0400
commit15533c88978a33a7f3c9eda8dbf96463bb6f7dc2 (patch)
treeab9d4d7b11874f6c51cb16078c7b15b04815552d /configure.ac
parent9bbd6502f09dd46179e7ca4a713f2ae24bfa79ef (diff)
downloadtor-15533c88978a33a7f3c9eda8dbf96463bb6f7dc2.tar.gz
tor-15533c88978a33a7f3c9eda8dbf96463bb6f7dc2.zip
Set our autoconf-breaking options last, not before we check for others
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 11 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index f80cb47dac..5bd35e248f 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