46692a1507
https://github.com/YosysHQ/yosys/releases/tag/yosys-0.37 The change to the patch is needed to fix this error on macOS: ``` + clang -std=c++11 -O2 -o cxxrtl-test-value -I../../backends/cxxrtl/runtime test_value.cc -lstdc++ test_value.cc:1:10: fatal error: 'cassert' file not found ^~~~~~~~~ 1 error generated. make: *** [Makefile:891: test] Error 1 ```
42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -215,7 +215,7 @@ ABC_ARCHFLAGS += "-DABC_NO_RLIMIT"
|
|
endif
|
|
|
|
ifeq ($(CONFIG),clang)
|
|
-CXX = clang
|
|
+CXX = clang++
|
|
LD = clang++
|
|
CXXFLAGS += -std=$(CXXSTD) -Os
|
|
ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H -Wno-c++11-narrowing $(ABC_ARCHFLAGS)"
|
|
--- a/tests/cxxrtl/run-test.sh
|
|
+++ b/tests/cxxrtl/run-test.sh
|
|
@@ -5,7 +5,7 @@ set -ex
|
|
run_subtest () {
|
|
local subtest=$1; shift
|
|
|
|
- ${CC:-gcc} -std=c++11 -O2 -o cxxrtl-test-${subtest} -I../../backends/cxxrtl/runtime test_${subtest}.cc -lstdc++
|
|
+ ${CXX:-gcc} -std=c++11 -O2 -o cxxrtl-test-${subtest} -I../../backends/cxxrtl/runtime test_${subtest}.cc -lstdc++
|
|
./cxxrtl-test-${subtest}
|
|
}
|
|
|
|
--- a/tests/fmt/run-test.sh
|
|
+++ b/tests/fmt/run-test.sh
|
|
@@ -51,7 +51,7 @@ test_cxxrtl () {
|
|
local subtest=$1; shift
|
|
|
|
../../yosys -p "read_verilog ${subtest}.v; proc; clean; write_cxxrtl -print-output std::cerr yosys-${subtest}.cc"
|
|
- ${CC:-gcc} -std=c++11 -o yosys-${subtest} -I../../backends/cxxrtl/runtime ${subtest}_tb.cc -lstdc++
|
|
+ ${CXX:-gcc} -std=c++11 -o yosys-${subtest} -I../../backends/cxxrtl/runtime ${subtest}_tb.cc -lstdc++
|
|
./yosys-${subtest} 2>yosys-${subtest}.log
|
|
iverilog -o iverilog-${subtest} ${subtest}.v ${subtest}_tb.v
|
|
./iverilog-${subtest} |grep -v '\$finish called' >iverilog-${subtest}.log
|
|
@@ -69,7 +69,7 @@ diff iverilog-always_full.log iverilog-always_full-1.log
|
|
|
|
../../yosys -p "read_verilog display_lm.v" >yosys-display_lm.log
|
|
../../yosys -p "read_verilog display_lm.v; write_cxxrtl yosys-display_lm.cc"
|
|
-${CC:-gcc} -std=c++11 -o yosys-display_lm_cc -I../../backends/cxxrtl/runtime display_lm_tb.cc -lstdc++
|
|
+${CXX:-gcc} -std=c++11 -o yosys-display_lm_cc -I../../backends/cxxrtl/runtime display_lm_tb.cc -lstdc++
|
|
./yosys-display_lm_cc >yosys-display_lm_cc.log
|
|
for log in yosys-display_lm.log yosys-display_lm_cc.log; do
|
|
grep "^%l: \\\\bot\$" "$log"
|