YosysHQ / yosys

Yosys Open SYnthesis Suite
https://yosyshq.net/yosys/
ISC License
3.3k stars 860 forks source link

Make C++17 compiler required #4460

Closed mmicko closed 6 days ago

mmicko commented 1 week ago

Team decided it is time to update minimal requirement for C++ compiler to be at least C++17 compliant.

Change in header file (that is used everywhere) makes sure that requirement is enforced.

Also updated workflow to run now tests with new minimal requirements.

povik commented 1 week ago

These Ubuntu 20.04 commands may be at odds with the C++17 requirement: https://github.com/YosysHQ/yosys/pull/4460/files#diff-7678ac5f848b6f19279c04c8df2c8547cc23e1d2875678f826e929f6153318d1L93-L100

whitequark commented 1 week ago

I wonder if I should upgrade CXXRTL to C++17 as well then...

widlarizer commented 1 week ago

These Ubuntu 20.04 commands may be at odds with the C++17 requirement: https://github.com/YosysHQ/yosys/pull/4460/files#diff-7678ac5f848b6f19279c04c8df2c8547cc23e1d2875678f826e929f6153318d1L93-L100

We're good on Ubuntu 20.04. Tested in docker with the apt install command you linked to:

root@19879717f761:/# clang --version
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
root@19879717f761:/# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
root@19879717f761:/# clang -std=c++17 a.cpp
/usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
root@19879717f761:/# clang -std=c++1237 a.cpp
error: invalid value 'c++1237' in '-std=c++1237'
povik commented 1 week ago

Good. Thanks for the confirmation