From faccbd7515fa718694696f94977b1e475da181d6 Mon Sep 17 00:00:00 2001 From: Mamy Ratsimbazafy Date: Wed, 26 Jun 2024 21:43:02 +0200 Subject: [PATCH] fix(Risc-V toolchain): don't hardcode absolute path in /opt, assume installation added RISC-V toolchain in $PATH --- provers/risc0/builder/src/main.rs | 2 +- provers/risc0/guest/src/mem.rs | 2 +- provers/sp1/builder/src/main.rs | 2 +- provers/sp1/guest/src/mem.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/provers/risc0/builder/src/main.rs b/provers/risc0/builder/src/main.rs index b0de9edb1..99f0c5811 100644 --- a/provers/risc0/builder/src/main.rs +++ b/provers/risc0/builder/src/main.rs @@ -35,7 +35,7 @@ impl Pipeline for Risc0Pipeline { ]) .cc_compiler("gcc".into()) .c_flags(&[ - "/opt/riscv/bin/riscv32-unknown-elf-gcc", + "riscv32-unknown-elf-gcc", "-march=rv32im", "-mstrict-align", "-falign-functions=2", diff --git a/provers/risc0/guest/src/mem.rs b/provers/risc0/guest/src/mem.rs index a151d19b7..d173a28c0 100644 --- a/provers/risc0/guest/src/mem.rs +++ b/provers/risc0/guest/src/mem.rs @@ -7,7 +7,7 @@ use std::{ /// This implementation is designed to be used in ZkVM where we cross-compile Rust code with C /// due to the dependency of c-kzg. This modification also requires env var: /// $ CC="gcc" -/// $ CC_riscv32im-risc0-zkvm-elf="/opt/riscv/bin/riscv32-unknown-elf-gcc" +/// $ CC_riscv32im-risc0-zkvm-elf="riscv32-unknown-elf-gcc" /// which is set in the build pipeline #[no_mangle] diff --git a/provers/sp1/builder/src/main.rs b/provers/sp1/builder/src/main.rs index 7db899a13..0e69abaf1 100644 --- a/provers/sp1/builder/src/main.rs +++ b/provers/sp1/builder/src/main.rs @@ -38,7 +38,7 @@ impl Pipeline for Sp1Pipeline { ]) .cc_compiler("gcc".into()) .c_flags(&[ - "/opt/riscv/bin/riscv32-unknown-elf-gcc", + "riscv32-unknown-elf-gcc", "-march=rv32im", "-mstrict-align", "-falign-functions=2", diff --git a/provers/sp1/guest/src/mem.rs b/provers/sp1/guest/src/mem.rs index a151d19b7..d173a28c0 100644 --- a/provers/sp1/guest/src/mem.rs +++ b/provers/sp1/guest/src/mem.rs @@ -7,7 +7,7 @@ use std::{ /// This implementation is designed to be used in ZkVM where we cross-compile Rust code with C /// due to the dependency of c-kzg. This modification also requires env var: /// $ CC="gcc" -/// $ CC_riscv32im-risc0-zkvm-elf="/opt/riscv/bin/riscv32-unknown-elf-gcc" +/// $ CC_riscv32im-risc0-zkvm-elf="riscv32-unknown-elf-gcc" /// which is set in the build pipeline #[no_mangle]