From c54e3e0741a27119b3badd8ff92b1988b7e9bd50 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 10 May 2013 18:53:14 +1000 Subject: [PATCH] - (dtucker) [configure.ac] Add -Werror to the -Qunused-arguments test so we don't get a warning on compilers that *don't* support it. Add -Wno-unknown-warning-option. Move both to the start of the list for maximum noise suppression. Tested with gcc 4.6.3, gcc 2.95.4 and clang 2.9. --- ChangeLog | 4 ++++ configure.ac | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d03a43527..94a23fb1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,10 @@ in to use it when we're using our own getopt. - (dtucker) [kex.c] Only include sha256 and ECC key exchange methods when the underlying libraries support them. + - (dtucker) [configure.ac] Add -Werror to the -Qunused-arguments test so + we don't get a warning on compilers that *don't* support it. Add + -Wno-unknown-warning-option. Move both to the start of the list for + maximum noise suppression. Tested with gcc 4.6.3, gcc 2.95.4 and clang 2.9. 20130423 - (djm) [auth.c configure.ac misc.c monitor.c monitor_wrap.c] Support diff --git a/configure.ac b/configure.ac index 93c50e085..6bcbef638 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.522 2013/05/10 03:54:23 dtucker Exp $ +# $Id: configure.ac,v 1.523 2013/05/10 08:53:14 dtucker Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) -AC_REVISION($Revision: 1.522 $) +AC_REVISION($Revision: 1.523 $) AC_CONFIG_SRCDIR([ssh.c]) AC_LANG([C]) @@ -129,6 +129,10 @@ AC_ARG_WITH([stackprotect], if test "$GCC" = "yes" || test "$GCC" = "egcs"; then + OSSH_CHECK_CFLAG_COMPILE([-Qunused-arguments -Werror], + [-Qunused-arguments]) + OSSH_CHECK_CFLAG_COMPILE([-Wunknown-warning-option -Werror], + [-Wno-unknown-warning-option]) OSSH_CHECK_CFLAG_COMPILE([-Wall]) OSSH_CHECK_CFLAG_COMPILE([-Wpointer-arith]) OSSH_CHECK_CFLAG_COMPILE([-Wuninitialized]) @@ -138,7 +142,6 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then OSSH_CHECK_CFLAG_COMPILE([-Wpointer-sign], [-Wno-pointer-sign]) OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result]) OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing]) - OSSH_CHECK_CFLAG_COMPILE([-Qunused-arguments]) OSSH_CHECK_CFLAG_COMPILE([-D_FORTIFY_SOURCE=2]) AC_MSG_CHECKING([gcc version]) GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`