From c37efc541b12d8e216b7a425808e4c24c48f9213 Mon Sep 17 00:00:00 2001 From: Dmitry Golovin Date: Fri, 9 Jun 2017 16:41:53 +0300 Subject: [PATCH] add proper check for clang supported optimization and stop complaining about unused arguements --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index c2db298..539c9fc 100755 --- a/configure +++ b/configure @@ -249,6 +249,7 @@ fi # tryflag CFLAGS_TRY -Werror=unknown-warning-option tryflag CFLAGS_TRY -Werror=unused-command-line-argument +tryflag CFLAGS_TRY -Werror=ignored-optimization-argument tryldflag LDFLAGS_TRY -Werror=unknown-warning-option tryldflag LDFLAGS_TRY -Werror=unused-command-line-argument @@ -504,6 +505,13 @@ tryflag CFLAGS_AUTO -Werror=implicit-int tryflag CFLAGS_AUTO -Werror=pointer-sign tryflag CFLAGS_AUTO -Werror=pointer-arith +# +# GCC ignores unused arguements by default, but Clang needs this extra +# parameter to stop printing warnings about LDFLAGS passed during +# compiling stage and CFLAGS passed during linking stage. +# +tryflag CFLAGS_AUTO -Qunused-arguments + if test "x$warnings" = xyes ; then tryflag CFLAGS_AUTO -Wall tryflag CFLAGS_AUTO -Wno-parentheses -- 2.13.0