Skip to content

Commit

Permalink
Update C compiler flags for riscv32im
Browse files Browse the repository at this point in the history
  • Loading branch information
preston-evans98 committed Jun 17, 2022
1 parent 6b87559 commit 6b43416
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions secp256k1-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@ fn main() {
.define("USE_SCALAR_INV_BUILTIN", Some("1"))
.compiler("/usr/local/opt/llvm/bin/clang")
.flag("--sysroot=/opt/riscv/riscv32-unknown-elf") // https://github.com/riscv-collab/riscv-gnu-toolchain has been built and stored in /opt/riscv
.flag("--gcc-toolchain=/opt/riscv/")
.flag("--gcc-toolchain=/opt/riscv") // https://github.com/riscv-collab/riscv-gnu-toolchain has been built and stored in /opt/riscv
.no_default_flags(true)
.flag("-O3")
.flag("--target=riscv32-unknown-none-elf")
.flag("-mabi=ilp32")
.flag("-mcmodel=medany")
.flag("-Os")
.flag("-fdata-sections")
.flag("-ffunction-sections")
.flag("-Wl")
.flag("-dead_strip")
.flag("-flto")
.flag("-march=rv32im")
.target("riscv32-unknown-none-elf");

if cfg!(feature = "lowmemory") {
Expand Down

0 comments on commit 6b43416

Please sign in to comment.