]> granicus.if.org Git - musl/commitdiff
fix clang CFLAGS checks and silence unused argument warnings
authorDmitry Golovin <dima@golovin.in>
Fri, 9 Jun 2017 14:10:47 +0000 (17:10 +0300)
committerRich Felker <dalias@aerifal.cx>
Fri, 23 Jun 2017 19:45:48 +0000 (15:45 -0400)
configure

index c2db298ce95f71afce00efae02e8f164ec47271b..539c9fcbe6271919fbddc112d5b9fe42dfb89390 100755 (executable)
--- 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