Skip to content

Commit

Permalink
CI: Add riscvgc-unknown-linux-gnu support to mk/.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Nov 10, 2022
1 parent 44bbbe8 commit 07dd462
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/ring-core/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
#elif defined(__MIPSEL__) && defined(__LP64__)
#define OPENSSL_64_BIT
#define OPENSSL_MIPS64
#elif defined(__riscv) && __SIZEOF_POINTER__ == 8
#define OPENSSL_64_BIT
#elif defined(__riscv) && __SIZEOF_POINTER__ == 4
#define OPENSSL_32_BIT
#elif defined(__wasm__)
#define OPENSSL_32_BIT
#else
Expand Down
7 changes: 7 additions & 0 deletions mk/cargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ rustflags_self_contained="-Clink-self-contained=yes -Clinker=rust-lld"
qemu_aarch64="qemu-aarch64 -L /usr/aarch64-linux-gnu"
qemu_arm="qemu-arm -L /usr/arm-linux-gnueabihf"
qemu_mipsel="qemu-mipsel -L /usr/mipsel-linux-gnu"
qemu_riscv64="qemu-riscv64 -L /usr/riscv64-linux-gnu"

# Avoid putting the Android tools in `$PATH` because there are tools in this
# directory like `clang` that would conflict with the same-named tools that may
Expand Down Expand Up @@ -98,6 +99,12 @@ case $target in
export CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_LINKER=mipsel-linux-gnu-gcc
export CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_RUNNER="$qemu_mipsel"
;;
riscv64gc-unknown-linux-gnu)
export CC_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-gcc
export AR_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-gcc-ar
export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc
export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUNNER="$qemu_riscv64"
;;
x86_64-unknown-linux-musl)
export CC_x86_64_unknown_linux_musl=clang-$llvm_version
export AR_x86_64_unknown_linux_musl=llvm-ar-$llvm_version
Expand Down
7 changes: 7 additions & 0 deletions mk/install-build-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ case $target in
libc6-dev-mipsel-cross \
qemu-user
;;
--target=riscv64gc-unknown-linux-gnu)
use_clang=1
install_packages \
gcc-riscv64-linux-gnu \
libc6-dev-riscv64-cross \
qemu-user
;;
--target=wasm32-unknown-unknown)
cargo install wasm-bindgen-cli --bin wasm-bindgen-test-runner
use_clang=1
Expand Down

0 comments on commit 07dd462

Please sign in to comment.