summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-10-20 09:30:33 +0200
committerThomas Weißschuh <linux@weissschuh.net>2023-12-11 22:38:21 +0100
commitaa68a5a83a0acc4c1babcb4f8be49261514ab65c (patch)
treebf5644d8d314c8ce0fa8637f7486c417b4f6f6bd /tools/include
parenttools/nolibc: error out on unsupported architecture (diff)
downloadlinux-aa68a5a83a0acc4c1babcb4f8be49261514ab65c.tar.xz
linux-aa68a5a83a0acc4c1babcb4f8be49261514ab65c.zip
tools/nolibc: move MIPS ABI validation into arch-mips.h
When installing nolibc to a sysroot arch.h is not used so its ABI check is bypassed. This makes is possible to compile nolibc with a non O32 ABI which may build but can not run. Move the check into arch-mips.h so it will always be evaluated. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/nolibc/arch-mips.h4
-rw-r--r--tools/include/nolibc/arch.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/include/nolibc/arch-mips.h b/tools/include/nolibc/arch-mips.h
index 4ab6fa54beee..3a2c76716b83 100644
--- a/tools/include/nolibc/arch-mips.h
+++ b/tools/include/nolibc/arch-mips.h
@@ -10,6 +10,10 @@
#include "compiler.h"
#include "crt.h"
+#if !defined(_ABIO32)
+#error Unsupported MIPS ABI
+#endif
+
/* Syscalls for MIPS ABI O32 :
* - WARNING! there's always a delayed slot!
* - WARNING again, the syntax is different, registers take a '$' and numbers
diff --git a/tools/include/nolibc/arch.h b/tools/include/nolibc/arch.h
index 2f72ccac0378..c8f4e5d3add9 100644
--- a/tools/include/nolibc/arch.h
+++ b/tools/include/nolibc/arch.h
@@ -23,7 +23,7 @@
#include "arch-arm.h"
#elif defined(__aarch64__)
#include "arch-aarch64.h"
-#elif defined(__mips__) && defined(_ABIO32)
+#elif defined(__mips__)
#include "arch-mips.h"
#elif defined(__powerpc__)
#include "arch-powerpc.h"