tools/nolibc: error out on unsupported architecture
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 5 Nov 2023 10:07:05 +0000 (11:07 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 11 Dec 2023 21:38:20 +0000 (22:38 +0100)
When an architecture is unsupported arch.h would silently continue.
This leads to a lot of followup errors because my_syscallX() is not
defined and the startup code is missing.

Avoid these confusing errors and fail the build early with a clear
error message and location.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
tools/include/nolibc/arch.h

index e276fb0680af5129cf715ba473573e6abe01a79c..2f72ccac03780361f475ad18b5a7d2dca2a940d3 100644 (file)
@@ -33,6 +33,8 @@
 #include "arch-s390.h"
 #elif defined(__loongarch__)
 #include "arch-loongarch.h"
+#else
+#error Unsupported Architecture
 #endif
 
 #endif /* _NOLIBC_ARCH_H */