--- a/rust.SlackBuild 2021-06-18 05:33:32.759514905 +0000 +++ b/rust.SlackBuild 2021-06-20 19:42:28.516328648 +0000 @@ -98,6 +98,9 @@ elif [ "$ARCH" = "armv7hl" ]; then BARCH="armv7" TARCH="$BARCH" +elif [ "$ARCH" = "riscv64" ]; then + BARCH="riscv64gc" + TARCH="$BARCH" else BARCH="$ARCH" TARCH="$ARCH" @@ -126,6 +129,10 @@ LIBDIRSUFFIX="64" elif [ "$ARCH" = "armv7hl" ]; then LIBDIRSUFFIX="" +elif [ "$ARCH" = "aarch64" ]; then + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "riscv64" ]; then + LIBDIRSUFFIX="64" else LIBDIRSUFFIX="" fi @@ -197,6 +204,12 @@ [target.armv7-unknown-linux-gnueabihf] llvm-config = "/usr/bin/llvm-config" + +[target.aarch64-unknown-linux-gnu] +llvm-config = "/usr/bin/llvm-config" + +[target.riscv64gc-unknown-linux-gnu] +llvm-config = "/usr/bin/llvm-config" EOF fi @@ -204,6 +217,11 @@ sed -i "s|^\(extended = true\)$|\1\nrustc = \"/usr/bin/rustc\"\ncargo = \"/usr/bin/cargo\"|" config.toml fi +# "analysis" does not compile for riscv64 architecture +if [ "$ARCH" = "riscv64" ] ; then + sed -i 's:\"analysis\",::g' config.toml +fi + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \