diff --git a/include/ring-core/target.h b/include/ring-core/target.h index 61f5c36f9..a65d7221a 100644 --- a/include/ring-core/target.h +++ b/include/ring-core/target.h @@ -52,6 +52,8 @@ #define OPENSSL_32_BIT #elif defined(__MIPSEL__) && defined(__LP64__) #define OPENSSL_64_BIT +#elif defined(__MIPSEB__) && !defined(__LP64__) +#define OPENSSL_32_BIT #elif defined(__PPC64__) || defined(__powerpc64__) #define OPENSSL_64_BIT #elif (defined(__PPC__) || defined(__powerpc__)) diff --git a/mk/cargo.sh b/mk/cargo.sh index ca272ccca..3d2001dc2 100755 --- a/mk/cargo.sh +++ b/mk/cargo.sh @@ -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_gnueabi="qemu-arm -L /usr/arm-linux-gnueabi" qemu_arm_gnueabihf="qemu-arm -L /usr/arm-linux-gnueabihf" +qemu_mips="qemu-mips -L /usr/mips-linux-gnu" qemu_mipsel="qemu-mipsel -L /usr/mipsel-linux-gnu" qemu_powerpc="qemu-ppc -L /usr/powerpc-linux-gnu" qemu_powerpc64="qemu-ppc64 -L /usr/powerpc64-linux-gnu" @@ -112,6 +113,12 @@ case $target in export AR_i686_unknown_linux_musl=llvm-ar-$llvm_version export CARGO_TARGET_I686_UNKNOWN_LINUX_MUSL_RUSTFLAGS="$rustflags_self_contained" ;; + mips-unknown-linux-gnu) + export CC_mips_unknown_linux_gnu=mips-linux-gnu-gcc + export AR_mips_unknown_linux_gnu=mips-linux-gnu-gcc-ar + export CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc + export CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_RUNNER="$qemu_mips" + ;; mipsel-unknown-linux-gnu) export CC_mipsel_unknown_linux_gnu=mipsel-linux-gnu-gcc export AR_mipsel_unknown_linux_gnu=mipsel-linux-gnu-gcc-ar diff --git a/mk/install-build-tools.sh b/mk/install-build-tools.sh index 0f82e8953..bb05bf009 100755 --- a/mk/install-build-tools.sh +++ b/mk/install-build-tools.sh @@ -94,6 +94,12 @@ case $target in --target=loongarch64-unknown-linux-gnu) use_clang=1 ;; +--target=mips-unknown-linux-gnu) + install_packages \ + gcc-mips-linux-gnu \ + libc6-dev-mips-cross \ + qemu-user + ;; --target=mipsel-unknown-linux-gnu) install_packages \ gcc-mipsel-linux-gnu \