1 # FP_CC_IGNORE_UNUSED_ARGS
2 # ------------------------
3 # GHC tends to produce command-lines with unused arguments that elicit
4 # warnings from Clang. Clang offers the @-Qunused-arguments@ flag to silence
7 # The primary effect of this is updating CONF_CC_OPTS_STAGE[12] to explicitly
8 # pass -Qunused-arguments to Clang, since otherwise Cc invocations by GHC will
12 # $2 = CC_OPTS variable
13 AC_DEFUN([FP_CC_IGNORE_UNUSED_ARGS],
15 AC_MSG_CHECKING([whether $1 supports -Qunused-arguments])
16 echo 'int main() { return 0; }' > conftest.c
17 if $1 -Qunused-arguments -Werror conftest.c > /dev/null 2>&1 ; then
18 CONF_CC_SUPPORTS_TARGET=YES
21 CONF_CC_SUPPORTS_TARGET=NO
24 rm -f conftest.c conftest
26 if test $CONF_CC_SUPPORTS_TARGET = YES ; then
27 $2="$$2 -Qunused-arguments"