Nolibc does not support all architectures. Add a kconfig option, so users can know where it is available. The new option is maintained inside tools/include/nolibc/ as only that directory is responsible for nolibc's availability. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx> --- init/Kconfig | 2 ++ tools/include/nolibc/Kconfig.nolibc | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/init/Kconfig b/init/Kconfig index d0d021b3fa3b3da5576421b4e1c63baf6c8afc09..794c9516d461ef7a3c5d399d982d3031199f0442 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -92,6 +92,8 @@ config CC_CAN_LINK_STATIC default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag) -static) if 64BIT default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag) -static) +source "tools/include/nolibc/Kconfig.nolibc" + # Fixed in GCC 14, 13.3, 12.4 and 11.5 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921 config GCC_ASM_GOTO_OUTPUT_BROKEN diff --git a/tools/include/nolibc/Kconfig.nolibc b/tools/include/nolibc/Kconfig.nolibc new file mode 100644 index 0000000000000000000000000000000000000000..a29825869d9b49a5502ae32d265b6f9c076f5713 --- /dev/null +++ b/tools/include/nolibc/Kconfig.nolibc @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0 + +config ARCH_HAS_NOLIBC + def_bool n + help + Enabled if nolibc supports the current kernel architecture + +config ENABLE_ARCH_HAS_NOLIBC + def_bool y + select ARCH_HAS_NOLIBC if X86 + select ARCH_HAS_NOLIBC if ARM + select ARCH_HAS_NOLIBC if ARM64 + select ARCH_HAS_NOLIBC if PPC + select ARCH_HAS_NOLIBC if MIPS + select ARCH_HAS_NOLIBC if LOONGARCH + select ARCH_HAS_NOLIBC if RISCV + select ARCH_HAS_NOLIBC if S390 + select ARCH_HAS_NOLIBC if UML && UML_X86 -- 2.48.1