From ac0ca32dcac4aa63535cad8d5e37666377091f08 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 17 Jul 2019 16:55:24 +0200 Subject: [PATCH] add riscv64 profiles --- common/build-profiles/riscv64-musl.sh | 7 +++++++ common/cross-profiles/riscv64-musl.sh | 12 ++++++++++++ common/xbps-src/shutils/common.sh | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 common/build-profiles/riscv64-musl.sh create mode 100644 common/cross-profiles/riscv64-musl.sh diff --git a/common/build-profiles/riscv64-musl.sh b/common/build-profiles/riscv64-musl.sh new file mode 100644 index 00000000000..4d31a667d84 --- /dev/null +++ b/common/build-profiles/riscv64-musl.sh @@ -0,0 +1,7 @@ +XBPS_TARGET_CFLAGS="-march=rv64imafdc" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TRIPLET="riscv64-unknown-linux-musl" +XBPS_RUST_TARGET="riscv64gc-unknown-linux-musl" +XBPS_ZIG_TARGET="riscv64-linux-musl" +XBPS_ZIG_CPU="baseline" diff --git a/common/cross-profiles/riscv64-musl.sh b/common/cross-profiles/riscv64-musl.sh new file mode 100644 index 00000000000..e3f30cdca0a --- /dev/null +++ b/common/cross-profiles/riscv64-musl.sh @@ -0,0 +1,12 @@ +# Cross build profile for riscv64 and Musl libc. + +XBPS_TARGET_MACHINE="riscv64-musl" +XBPS_TARGET_QEMU_MACHINE="riscv64" +XBPS_CROSS_TRIPLET="riscv64-linux-musl" +XBPS_CROSS_CFLAGS="-march=rv64imafdc" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="riscv64gc-unknown-linux-musl" +XBPS_CROSS_ZIG_TARGET="riscv64-linux-musl" +XBPS_CROSS_ZIG_CPU="baseline" diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 2218d34ce30..fec84c8f85e 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -289,6 +289,7 @@ get_endian() { ppc*le) echo "le";; ppc*) echo "be";; x86_64) echo "le";; + riscv64) echo "le";; esac } @@ -316,6 +317,7 @@ get_wordsize() { ppc64*) echo "64";; ppc*) echo "32";; x86_64) echo "64";; + riscv64) echo "64";; esac }