forked from github/verilator
Add CFG_CXXFLAGS_STD so CFG_CXXFLAGS_STD_NEWEST can still exist (#3881)
This commit is contained in:
parent
5cd3d831bb
commit
53835355b0
16
configure.ac
16
configure.ac
@ -532,21 +532,22 @@ AC_DEFUN([_MY_CXX_CHECK_CXX_VER],
|
|||||||
[_my_result=no])
|
[_my_result=no])
|
||||||
])
|
])
|
||||||
|
|
||||||
# Add $CFG_CXXFLAGS_STD_NEWEST 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
|
||||||
AC_MSG_CHECKING(whether $CXX supports C++11)
|
AC_MSG_CHECKING(whether $CXX supports C++11)
|
||||||
_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_NEWEST"
|
CXXFLAGS="$CXXFLAGS $CFG_CXXFLAGS_STD"
|
||||||
CFG_CXX_FLAGS_CMAKE="$CFG_CXX_FLAGS_CMAKE $CFG_CXXFLAGS_STD_NEWEST"
|
CFG_CXX_FLAGS_CMAKE="$CFG_CXX_FLAGS_CMAKE $CFG_CXXFLAGS_STD"
|
||||||
AC_MSG_CHECKING(whether $CXX supports C++11 with $CFG_CXXFLAGS_STD_NEWEST)
|
AC_MSG_CHECKING(whether $CXX supports C++11 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
|
||||||
# CFG_CXXFLAGS_STD_NEWEST is also propagated to include/verilated.mk.in
|
# CFG_CXXFLAGS_STD is also propagated to include/verilated.mk.in
|
||||||
# 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_NEWEST=""
|
CFG_CXXFLAGS_STD=""
|
||||||
fi
|
fi
|
||||||
if test "$_my_result" = "no" ; then
|
if test "$_my_result" = "no" ; then
|
||||||
AC_MSG_NOTICE([[]])
|
AC_MSG_NOTICE([[]])
|
||||||
@ -555,6 +556,7 @@ if test "$_my_result" = "no" ; then
|
|||||||
Verilator requires a C++11 or newer compiler.]])
|
Verilator requires a C++11 or newer compiler.]])
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(CFG_CXXFLAGS_STD)
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec],
|
AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec],
|
||||||
|
@ -21,7 +21,9 @@ CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
|
|||||||
|
|
||||||
# Compiler flags to enable profiling
|
# Compiler flags to enable profiling
|
||||||
CFG_CXXFLAGS_PROFILE = @CFG_CXXFLAGS_PROFILE@
|
CFG_CXXFLAGS_PROFILE = @CFG_CXXFLAGS_PROFILE@
|
||||||
# Select newest language
|
# Select language required to compile (often empty)
|
||||||
|
CFG_CXXFLAGS_STD = @CFG_CXXFLAGS_STD@
|
||||||
|
# Select newest language (unused by this Makefile, for some test's Makefiles)
|
||||||
CFG_CXXFLAGS_STD_NEWEST = @CFG_CXXFLAGS_STD_NEWEST@
|
CFG_CXXFLAGS_STD_NEWEST = @CFG_CXXFLAGS_STD_NEWEST@
|
||||||
# Compiler flags to use to turn off unused and generated code warnings, such as -Wno-div-by-zero
|
# Compiler flags to use to turn off unused and generated code warnings, such as -Wno-div-by-zero
|
||||||
CFG_CXXFLAGS_NO_UNUSED = @CFG_CXXFLAGS_NO_UNUSED@
|
CFG_CXXFLAGS_NO_UNUSED = @CFG_CXXFLAGS_NO_UNUSED@
|
||||||
@ -140,7 +142,7 @@ endif
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
##### Threaded builds
|
##### Threaded builds
|
||||||
|
|
||||||
CPPFLAGS += $(CFG_CXXFLAGS_STD_NEWEST)
|
CPPFLAGS += $(CFG_CXXFLAGS_STD)
|
||||||
LDLIBS += $(CFG_LDLIBS_THREADS)
|
LDLIBS += $(CFG_LDLIBS_THREADS)
|
||||||
|
|
||||||
ifneq ($(VM_TIMING),0)
|
ifneq ($(VM_TIMING),0)
|
||||||
|
@ -41,7 +41,7 @@ CPPFLAGS += $(CPPFLAGS_ADD)
|
|||||||
|
|
||||||
ifeq ($(CFG_WITH_LONGTESTS),yes)
|
ifeq ($(CFG_WITH_LONGTESTS),yes)
|
||||||
ifeq ($(DRIVER_STD),newest)
|
ifeq ($(DRIVER_STD),newest)
|
||||||
CPPFLAGS += $(CFG_CXXFLAGS_STD_NEWEST)
|
CPPFLAGS += $(CFG_CXXFLAGS_STD)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user