From: Dmitry Golovin Date: Fri, 9 Jun 2017 14:10:47 +0000 (+0300) Subject: fix clang CFLAGS checks and silence unused argument warnings X-Git-Tag: v1.1.17~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d12a6a21fd146f543e8a6b8ec4cce7fd61be606;p=musl fix clang CFLAGS checks and silence unused argument warnings --- diff --git a/configure b/configure index c2db298c..539c9fcb 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