configure: only try -Qunused-arguments for clang
authorRich Felker <dalias@aerifal.cx>
Thu, 13 Sep 2018 02:43:38 +0000 (22:43 -0400)
committerRich Felker <dalias@aerifal.cx>
Thu, 13 Sep 2018 02:43:38 +0000 (22:43 -0400)
other compilers don't need this option, but gcc 3 and perhaps others
accept it despite not understanding it, then print warnings about it
at build time.

omitting it when not needed will also help shorten the command lines.

configure

index 6e489a1..de2add1 100755 (executable)
--- a/configure
+++ b/configure
@@ -507,7 +507,7 @@ tryflag CFLAGS_AUTO -Werror=pointer-arith
 # parameter to stop printing warnings about LDFLAGS passed during
 # compiling stage and CFLAGS passed during linking stage.
 #
-tryflag CFLAGS_AUTO -Qunused-arguments
+test "$cc_family" = clang && tryflag CFLAGS_AUTO -Qunused-arguments
 
 if test "x$warnings" = xyes ; then
 tryflag CFLAGS_AUTO -Wall