summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toolchain.inc3
-rw-r--r--util/crossgcc/Makefile9
-rwxr-xr-xutil/xcompile/xcompile10
3 files changed, 20 insertions, 2 deletions
diff --git a/toolchain.inc b/toolchain.inc
index f8c7ea4ac3..f888d68d0a 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -58,11 +58,14 @@ ARCHDIR-x86_32 := x86
ARCHDIR-arm := arm
ARCHDIR-arm64 := arm64
ARCHDIR-riscv := riscv
+ARCHDIR-mipsel := mips
CFLAGS_arm := -mno-unaligned-access -ffunction-sections -fdata-sections
CFLAGS_arm64 := -ffunction-sections -fdata-sections
+CFLAGS_mipsel := -mips32r2 -G 0
+
toolchain_to_dir = \
$(foreach arch,$(ARCH_SUPPORTED),\
$(eval CPPFLAGS_$(arch) += \
diff --git a/util/crossgcc/Makefile b/util/crossgcc/Makefile
index 4aa6bdc2d6..0785b65cca 100644
--- a/util/crossgcc/Makefile
+++ b/util/crossgcc/Makefile
@@ -1,4 +1,4 @@
-all: build-i386 build-armv7a build-aarch64
+all: build-i386 build-armv7a build-aarch64 build-mips
build-i386:
bash ./buildgcc -G -p i386-elf
@@ -9,6 +9,9 @@ build-armv7a:
build-aarch64:
bash ./buildgcc -G -p aarch64-elf
+build-mips:
+ bash ./buildgcc -G -p mips-elf
+
.PHONY: build-i386-without-gdb
build-i386-without-gdb:
bash ./buildgcc -p i386-elf
@@ -21,6 +24,10 @@ build-armv7a-without-gdb:
build-aarch64-without-gdb:
bash ./buildgcc -p aarch64-elf
+.PHONY: build-mips-without-gdb
+build-mips-without-gdb:
+ bash ./buildgcc -p mips-elf
+
clean:
rm -rf xgcc
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index ea2eb47f73..29cad285cf 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -168,7 +168,7 @@ EOF
}
# Architecture definition
-SUPPORTED_ARCHITECTURE="x86 arm arm64 riscv"
+SUPPORTED_ARCHITECTURE="x86 arm arm64 riscv mipsel"
arch_config_arm() {
TARCH="arm"
@@ -204,6 +204,14 @@ arch_config_x86() {
TABI="elf"
}
+arch_config_mipsel() {
+ TARCH="mipsel"
+ TBFDARCH="littlemips"
+ TCLIST="mipsel"
+ TWIDTH="32"
+ TABI="elf"
+}
+
test_architecture() {
architecture=$1