mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
configure: Better prune unknwon gcc -Wno- flags.
This commit is contained in:
parent
183cabc77d
commit
9e38ed9a39
12
configure.ac
12
configure.ac
@ -120,6 +120,18 @@ AC_DEFUN([_MY_CXX_CHECK_OPT],
|
|||||||
fi
|
fi
|
||||||
fi],
|
fi],
|
||||||
[_my_result=no])
|
[_my_result=no])
|
||||||
|
# GCC is annoying, trying to be helpful, it postpones unknown -Wno-
|
||||||
|
# options if there's no error We want to see them regardless, so try
|
||||||
|
# forcing an error and see if we get a gcc warning
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([[an_error "intentional-error-for-test.h"
|
||||||
|
]],[])],
|
||||||
|
[], # Ignore ok exit
|
||||||
|
[if test -s conftest.err; then
|
||||||
|
if grep -e "$2" conftest.err >/dev/null; then
|
||||||
|
_my_result=no
|
||||||
|
fi
|
||||||
|
fi])
|
||||||
AC_MSG_RESULT($_my_result)
|
AC_MSG_RESULT($_my_result)
|
||||||
if test "$_my_result" = "yes" ; then
|
if test "$_my_result" = "yes" ; then
|
||||||
$1="$$1 $2"
|
$1="$$1 $2"
|
||||||
|
Loading…
Reference in New Issue
Block a user