]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/nolibc: move MIPS ABI validation into arch-mips.h
authorThomas Weißschuh <linux@weissschuh.net>
Fri, 20 Oct 2023 07:30:33 +0000 (09:30 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 11 Dec 2023 21:38:21 +0000 (22:38 +0100)
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>
tools/include/nolibc/arch-mips.h
tools/include/nolibc/arch.h

index 4ab6fa54beee4a9dfac8eec36b98aa66b9ccb22c..3a2c76716b8392b3a7b1d6c4800ea3d03d8f8877 100644 (file)
 #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
index 2f72ccac03780361f475ad18b5a7d2dca2a940d3..c8f4e5d3add9eb5b8a438900c084dc0449fcfbd6 100644 (file)
@@ -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"