diff mbox series

[1/6] tools/nolibc: error out on unsupported architecture

Message ID 20231105-nolibc-mips-be-v1-1-6c2ad3e50a1f@weissschuh.net (mailing list archive)
State Accepted
Commit 48946c5aa7a848c7dfc2151267af92956f492f58
Headers show
Series tools/nolibc: MIPS bugfixes and refactoring | expand

Commit Message

Thomas Weißschuh Nov. 5, 2023, 10:09 a.m. UTC
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>
---
 tools/include/nolibc/arch.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Willy Tarreau Nov. 5, 2023, 10:36 a.m. UTC | #1
On Sun, Nov 05, 2023 at 11:09:55AM +0100, Thomas Weißschuh wrote:
> 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.

Oops, good catch!

Thanks,
Willy
diff mbox series

Patch

diff --git a/tools/include/nolibc/arch.h b/tools/include/nolibc/arch.h
index e276fb0680af..2f72ccac0378 100644
--- a/tools/include/nolibc/arch.h
+++ b/tools/include/nolibc/arch.h
@@ -33,6 +33,8 @@ 
 #include "arch-s390.h"
 #elif defined(__loongarch__)
 #include "arch-loongarch.h"
+#else
+#error Unsupported Architecture
 #endif
 
 #endif /* _NOLIBC_ARCH_H */