Skip to content

Commit 7ee553d

Browse files
authored
build: adding tasks for building riscv-tests in container (#823)
- Added newlib package to container. - Renamed task "checkout-riscv-tests" to "checkout_riscv_test" for consistency - Added task build_riscv_tests Note: build_riscv_tests task builds the isa tests part of riscv-tests to enable testing of hart models with the ISS. Benchmarks are not built at the moment.
1 parent 1a7a348 commit 7ee553d

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ RUN \
2626
libc6-dev-riscv64-cross \
2727
libelf-dev \
2828
libgmp-dev \
29+
libnewlib-dev\
2930
libyaml-dev \
3031
nodejs \
3132
npm \

backends/cpp_hart_gen/tasks.rake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,13 @@ file "#{$root}/ext/riscv-tests/env/LICENSE" => ["#{$root}/ext/riscv-tests/LICENS
361361
end
362362
end
363363

364-
task "checkout-riscv-tests" => "#{$root}/ext/riscv-tests/env/LICENSE"
364+
task checkout_riscv_tests: "#{$root}/ext/riscv-tests/env/LICENSE"
365+
366+
task build_riscv_tests: "checkout_riscv_tests" do
367+
Dir.chdir "#{$root}/ext/riscv-tests/isa" do
368+
sh "make RISCV_GCC_OPTS='-static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles -I/usr/include/newlib'"
369+
end
370+
end
365371

366372
file "#{CPP_HART_GEN_DST}/riscv-tests-build-64/Makefile" => "#{$root}/ext/riscv-tests/env/LICENSE" do |t|
367373
FileUtils.mkdir_p File.dirname(t.name)

bin/.container-tag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8
1+
0.9

container.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ From: ubuntu:24.04
2929
libc6-dev-riscv64-cross \
3030
libelf-dev \
3131
libgmp-dev \
32+
libnewlib-dev \
3233
libyaml-dev \
3334
nodejs \
3435
npm \

0 commit comments

Comments
 (0)