parent
2daa09a255
commit
11998ccc58
43
configure.ac
43
configure.ac
|
|
@ -137,21 +137,6 @@ AC_ARG_ENABLE([longtests],
|
||||||
AC_SUBST(CFG_WITH_LONGTESTS)
|
AC_SUBST(CFG_WITH_LONGTESTS)
|
||||||
AC_MSG_RESULT($CFG_WITH_LONGTESTS)
|
AC_MSG_RESULT($CFG_WITH_LONGTESTS)
|
||||||
|
|
||||||
# Disable version check
|
|
||||||
AC_MSG_CHECKING(whether to disable version check)
|
|
||||||
AC_ARG_ENABLE([version-check],
|
|
||||||
[AS_HELP_STRING([--disable-version-check],
|
|
||||||
[disable minimum compile version check.
|
|
||||||
use only when instructed by developers])],
|
|
||||||
[case "${enableval}" in
|
|
||||||
yes) CFG_VERSION_CHECK=yes ;;
|
|
||||||
no) CFG_VERSION_CHECK=no ;;
|
|
||||||
*) AC_MSG_ERROR([bad value ${enableval} for --disable-version-check]) ;;
|
|
||||||
esac],
|
|
||||||
CFG_VERSION_CHECK=yes)
|
|
||||||
AC_SUBST(CFG_VERSION_CHECK)
|
|
||||||
AC_MSG_RESULT($CFG_VERSION_CHECK)
|
|
||||||
|
|
||||||
AC_CHECK_PROG(HAVE_Z3,z3,yes)
|
AC_CHECK_PROG(HAVE_Z3,z3,yes)
|
||||||
AC_CHECK_PROG(HAVE_CVC5,cvc5,yes)
|
AC_CHECK_PROG(HAVE_CVC5,cvc5,yes)
|
||||||
AC_CHECK_PROG(HAVE_CVC4,cvc4,yes)
|
AC_CHECK_PROG(HAVE_CVC4,cvc4,yes)
|
||||||
|
|
@ -348,7 +333,6 @@ AC_DEFUN([_MY_CXX_CHECK_CORO_SET],
|
||||||
if test "$_my_result" = "yes" ; then
|
if test "$_my_result" = "yes" ; then
|
||||||
$1="$2"
|
$1="$2"
|
||||||
AC_DEFINE([HAVE_COROUTINES],[1],[Defined if coroutines are supported by $CXX])
|
AC_DEFINE([HAVE_COROUTINES],[1],[Defined if coroutines are supported by $CXX])
|
||||||
CFG_HAVE_COROUTINES=yes
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
@ -417,12 +401,12 @@ AC_SUBST(CFG_CXXFLAGS_PROFILE)
|
||||||
|
|
||||||
# Flag to select newest language standard supported
|
# Flag to select newest language standard supported
|
||||||
# Macros work such that first option that passes is the one we take
|
# Macros work such that first option that passes is the one we take
|
||||||
# Beware using flags that are not required, as can break packaged SystemC
|
# Currently enable c++17/c++14 due to packaged SystemC dependency
|
||||||
# c++20 is the newest that Verilator is regularly tested to support
|
# c++17 is the newest that Verilator is regularly tested to support
|
||||||
# c++14 is the oldest that Verilator supports
|
# c++14 is the oldest that Verilator supports
|
||||||
# gnu is required for Cygwin to compile verilated.h successfully
|
# gnu is required for Cygwin to compile verilated.h successfully
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++20)
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++20)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++20)
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++20)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++17)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++17)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++17)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++17)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++14)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++14)
|
||||||
|
|
@ -575,7 +559,7 @@ AC_DEFUN([_MY_CXX_CHECK_CXX_VER],
|
||||||
# Set $_my_result
|
# Set $_my_result
|
||||||
AC_LINK_IFELSE(
|
AC_LINK_IFELSE(
|
||||||
[AC_LANG_PROGRAM([#include <thread>
|
[AC_LANG_PROGRAM([#include <thread>
|
||||||
#if (__cplusplus < 202002L)
|
#if (__cplusplus < 201402L)
|
||||||
# error "Too old"
|
# error "Too old"
|
||||||
#endif
|
#endif
|
||||||
], [[ ]])],
|
], [[ ]])],
|
||||||
|
|
@ -591,13 +575,13 @@ AC_DEFUN([_MY_CXX_CHECK_CXX_VER],
|
||||||
# Add $CFG_CXXFLAGS_STD only if can't compile correctly otherwise,
|
# Add $CFG_CXXFLAGS_STD only if can't compile correctly otherwise,
|
||||||
# as adding std= when not needed can cause errors with the C++ std library.
|
# as adding std= when not needed can cause errors with the C++ std library.
|
||||||
CFG_CXXFLAGS_STD=$CFG_CXXFLAGS_STD_NEWEST
|
CFG_CXXFLAGS_STD=$CFG_CXXFLAGS_STD_NEWEST
|
||||||
AC_MSG_CHECKING(whether $CXX supports C++20)
|
AC_MSG_CHECKING(whether $CXX supports C++14)
|
||||||
_MY_CXX_CHECK_CXX_VER()
|
_MY_CXX_CHECK_CXX_VER()
|
||||||
AC_MSG_RESULT($_my_result)
|
AC_MSG_RESULT($_my_result)
|
||||||
if test "$_my_result" = "no" ; then
|
if test "$_my_result" = "no" ; then
|
||||||
CXXFLAGS="$CXXFLAGS $CFG_CXXFLAGS_STD"
|
CXXFLAGS="$CXXFLAGS $CFG_CXXFLAGS_STD"
|
||||||
CFG_CXX_FLAGS_CMAKE="$CFG_CXX_FLAGS_CMAKE $CFG_CXXFLAGS_STD"
|
CFG_CXX_FLAGS_CMAKE="$CFG_CXX_FLAGS_CMAKE $CFG_CXXFLAGS_STD"
|
||||||
AC_MSG_CHECKING(whether $CXX supports C++20 with $CFG_CXXFLAGS_STD)
|
AC_MSG_CHECKING(whether $CXX supports C++14 with $CFG_CXXFLAGS_STD)
|
||||||
_MY_CXX_CHECK_CXX_VER()
|
_MY_CXX_CHECK_CXX_VER()
|
||||||
AC_MSG_RESULT($_my_result)
|
AC_MSG_RESULT($_my_result)
|
||||||
else
|
else
|
||||||
|
|
@ -605,19 +589,12 @@ else
|
||||||
# make sure we use the same std flag while compiling verilator and verilated design
|
# make sure we use the same std flag while compiling verilator and verilated design
|
||||||
CFG_CXXFLAGS_STD=""
|
CFG_CXXFLAGS_STD=""
|
||||||
fi
|
fi
|
||||||
if test "$CFG_VERSION_CHECK" != "no" ; then
|
if test "$_my_result" = "no" ; then
|
||||||
if test "$_my_result" = "no" ; then
|
|
||||||
AC_MSG_NOTICE([[]])
|
AC_MSG_NOTICE([[]])
|
||||||
AC_MSG_ERROR([[the $CXX compiler appears to not support C++20.
|
AC_MSG_ERROR([[the $CXX compiler appears to not support C++14.
|
||||||
|
|
||||||
Verilator requires a C++20 or newer compiler.]])
|
Verilator requires a C++14 or newer compiler.]])
|
||||||
fi
|
|
||||||
if test "$CFG_HAVE_COROUTINES" != "yes" ; then
|
|
||||||
AC_MSG_NOTICE([[]])
|
|
||||||
AC_MSG_ERROR([[the $CXX compiler appears to not support coroutines.
|
|
||||||
|
|
||||||
Verilator requires a C++20 or newer compiler.]])
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
AC_SUBST(CFG_CXXFLAGS_STD)
|
AC_SUBST(CFG_CXXFLAGS_STD)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue