aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci/build_riscv64.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci/build_riscv64.sh')
-rwxr-xr-xscripts/ci/build_riscv64.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/ci/build_riscv64.sh b/scripts/ci/build_riscv64.sh
new file mode 100755
index 000000000..e52505c68
--- /dev/null
+++ b/scripts/ci/build_riscv64.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+set -e
+
+export TARGET_ARCH=riscv64-linux-gnu
+if [ "${CC#clang}" != "${CC}" ] ; then
+ export CC="clang --target=${TARGET_ARCH}"
+ export CXX="clang++ --target=${TARGET_ARCH}"
+else
+ export CC="${TARGET_ARCH}-gcc"
+ export CXX="${TARGET_ARCH}-g++"
+fi
+
+# Use target libraries
+export PKG_CONFIG_PATH=
+export PKG_CONFIG_LIBDIR=/usr/lib/${TARGET_ARCH}/pkgconfig
+
+exec "$(dirname "$0")"/build.sh