SpinalHDL / SpinalHDL

Scala based HDL
Other
1.57k stars 304 forks source link

Update C++ version CFLAGS as Verilator requires C++14 or newer #1428

Closed saahm closed 1 month ago

saahm commented 1 month ago

Closes #

Context, Motivation & Description

I stumbled on this when I used a Docker container with newer Verilator versions, SpinalHDL would not be able to build the Verilator simulations as an Error about the C++ Version (c++11 instead c++14) occurs.

In file included from /usr/share/verilator/include/verilated_dpi.cpp:30:
/usr/share/verilator/include/verilatedos.h:271:3: error: #error "Verilator requires a C++14 or newer compiler"
  271 | # error "Verilator requires a C++14 or newer compiler"
      |   ^~~~~
In file included from /usr/share/verilator/include/verilated.h:42,
                 from ./VMurax.h:11,
                 from ../main.cpp:1:
/usr/share/verilator/include/verilatedos.h:271:3: error: #error "Verilator requires a C++14 or newer compiler"
  271 | # error "Verilator requires a C++14 or newer compiler"
      |   ^~~~~

This commit should at least fix it for now.

Is there any further checks I need to do or what I can do to help this?

Impact on code generation

Checklist

Dolu1990 commented 1 month ago

Thanks ^^