From 3d91cd1ee394a615096129fa3a753934e971a8df Mon Sep 17 00:00:00 2001 From: LSTM-Kirigaya <1193466151@qq.com> Date: Fri, 17 Jan 2025 17:23:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=BE=99=E8=8A=AF=E7=9A=84?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_loongson.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 build_loongson.sh diff --git a/build_loongson.sh b/build_loongson.sh new file mode 100644 index 0000000..41ef168 --- /dev/null +++ b/build_loongson.sh @@ -0,0 +1,11 @@ +export LC_ALL=POSIX +export CROSS_TARGET="loongarch64-unknown-linux-gnu" +export MABI="lp64d" +export BUILD64="-mabi=lp64d" + +export PATH=$PATH:$HOME/package/cross-tools/bin +export CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_LINKER=loongarch64-unknown-linux-gnu-gcc +export CC_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-gcc +export CXX_loongarch64_unknown_linux_gnu=loongarch64-unknown-linux-gnu-g++ + +cargo build --release --target "${CROSS_TARGET}"