tests: CXX may be e.g. gcc, so use CC and link stdc++ explicitly

This commit is contained in:
Charlotte 2023-06-28 11:51:28 +10:00 committed by Marcelina Kościelnicka
parent 4e94f62116
commit 992a728ec7
2 changed files with 4 additions and 4 deletions

View File

@ -700,7 +700,7 @@ struct AST_INTERNAL::ProcessGenerator
sstr << ast->str << "$" << ast->filename << ":" << ast->location.first_line << "$" << (autoidx++);
RTLIL::Cell *cell = current_module->addCell(sstr.str(), ID($print));
cell->attributes[ID::src] = stringf("%s:%d.%d-%d.%d", ast->filename.c_str(), ast->location.first_line, ast->location.first_column, ast->location.last_line, ast->location.last_column);
set_src_attr(cell, ast);
RTLIL::SigSpec triggers;
RTLIL::Const polarity;
@ -719,7 +719,7 @@ struct AST_INTERNAL::ProcessGenerator
cell->setPort(ID::TRG, triggers);
Wire *wire = current_module->addWire(sstr.str() + "_EN", 1);
wire->attributes[ID::src] = stringf("%s:%d.%d-%d.%d", ast->filename.c_str(), ast->location.first_line, ast->location.first_column, ast->location.last_line, ast->location.last_column);
set_src_attr(wire, ast);
cell->setPort(ID::EN, wire);
proc->root_case.actions.push_back(SigSig(wire, false));

View File

@ -48,7 +48,7 @@ test_roundtrip bin_unsigned -DBASE_HEX -DSIGN=""
test_roundtrip bin_signed -DBASE_HEX -DSIGN="signed"
../../yosys -p "read_verilog always_full.v; write_cxxrtl -print-output std::cerr yosys-always_full.cc"
${CXX:-g++} -o yosys-always_full -I../.. always_full_tb.cc
${CC:-gcc} -o yosys-always_full -I../.. always_full_tb.cc -lstdc++
./yosys-always_full 2>yosys-always_full.log
iverilog -o iverilog-always_full always_full.v always_full_tb.v
./iverilog-always_full | awk '/<<<BEGIN>>>/,/<<<END>>>/ {print $0}' >iverilog-always_full.log
@ -56,7 +56,7 @@ diff iverilog-always_full.log yosys-always_full.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"
${CXX:-g++} -o yosys-display_lm_cc -I../.. display_lm_tb.cc
${CC:-gcc} -o yosys-display_lm_cc -I../.. 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"