Add -std=c++11 to Makefile.verilator to support older gcc
Older GCC versions default to an older version of C++ when one is not specified explicitly
@@ -32,6 +32,8 @@ ifdef COCOTB_HDL_TIMEPRECISION
SIM_BUILD_FLAGS += -DVL_TIME_PRECISION_STR=$(COCOTB_HDL_TIMEPRECISION)
endif
+SIM_BUILD_FLAGS += -std=c++11
+
COMPILE_ARGS += --vpi --public-flat-rw --prefix Vtop -o $(TOPLEVEL) -LDFLAGS "-L `dirname $(COCOTB_VPI_LIB)` -lvpi -lgpi -lcocotb -lgpilog -lcocotbutils"
$(SIM_BUILD)/Vtop.mk: $(VERILOG_SOURCES) $(CUSTOM_COMPILE_DEPS) $(COCOTB_SHARE_DIR)/lib/verilator/verilator.cpp
@@ -39,7 +41,7 @@ $(SIM_BUILD)/Vtop.mk: $(VERILOG_SOURCES) $(CUSTOM_COMPILE_DEPS) $(COCOTB_SHARE_D
# Compilation phase
$(SIM_BUILD)/$(TOPLEVEL): $(SIM_BUILD)/Vtop.mk $(COCOTB_LIBS) $(COCOTB_VPI_LIB)
- CPPFLAGS=$(SIM_BUILD_FLAGS) make -C $(SIM_BUILD) -f Vtop.mk
+ CPPFLAGS="$(SIM_BUILD_FLAGS)" make -C $(SIM_BUILD) -f Vtop.mk
ifeq ($(OS),Msys)
