diff mbox series

[v1,3/4] selftests/nolibc: customize CROSS_COMPILE for loongarch

Message ID d38f1fa6dec5ebb7ac4d54c728edb6d70cee3008.1691263493.git.falcon@tinylab.org
State New
Headers show
Series selftests/nolibc: customize CROSS_COMPILE for all supported architectures | expand

Commit Message

Zhangjin Wu Aug. 5, 2023, 7:49 p.m. UTC
Loongarch is a fresh new architecture, there is no prebuilt toolchain
from most of local software repositories, let's use the one from [1].

[1]: https://mirrors.edge.kernel.org/pub/tools/crosstool/

Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
---
 tools/testing/selftests/nolibc/Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index d32694656221..9cd6dc0e8b75 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -56,6 +56,14 @@  IMAGE            = $(IMAGE_$(XARCH))
 IMAGE_NAME       = $(notdir $(IMAGE))
 
 # CROSS_COMPILE: cross toolchain prefix by architecture
+#
+# Notes:
+# - Loongarch may require toolchain from
+#   https://mirrors.edge.kernel.org/pub/tools/crosstool/
+#
+# For an external toolchain, please add its bin/ path to 'PATH' and then pass
+# CROSS_COMPLE, CROSS_COMPILE_$(XARCH), or even CC from command line.
+
 CROSS_COMPILE_i386      ?= x86_64-linux-gnu-
 CROSS_COMPILE_x86_64    ?= x86_64-linux-gnu-
 CROSS_COMPILE_x86       ?= x86_64-linux-gnu-
@@ -67,6 +75,7 @@  CROSS_COMPILE_ppc64     ?= powerpc64le-linux-gnu-
 CROSS_COMPILE_ppc64le   ?= powerpc64le-linux-gnu-
 CROSS_COMPILE_riscv     ?= riscv64-linux-gnu-
 CROSS_COMPILE_s390      ?= s390x-linux-gnu-
+CROSS_COMPILE_loongarch ?= loongarch64-linux-
 CROSS_COMPILE           ?= $(CROSS_COMPILE_$(XARCH))
 
 # make sure CC is prefixed with CROSS_COMPILE