diff mbox series

[2/4] package/Makefile.in: add detection for the lack of C library

Message ID 20220726163102.2107923-2-thomas.petazzoni@bootlin.com
State Superseded
Headers show
Series [1/4] arch/Config.in.riscv: lp64f ABI is only supported if MMU is enabled | expand

Commit Message

Thomas Petazzoni July 26, 2022, 4:30 p.m. UTC
We recently had several cases of architecture configurations for which
no C library was available, leading to a build failure during the gcc
build. In order to more easily detect those bogus configurations,
let's bail out very early by detecting the lack of C library
selection.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/Makefile.in | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/package/Makefile.in b/package/Makefile.in
index 508ea7c366..f8920c87a4 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -47,6 +47,12 @@  else
 TARGET_OS = linux
 endif
 
+# This happens if there is a bug in Buildroot that allows an
+# architecture configuration that isn't supported by any library.
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC)$(BR2_TOOLCHAIN_USES_UCLIBC)$(BR2_TOOLCHAIN_USES_MUSL),)
+$(error No C library enabled, this is not possible.)
+endif
+
 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 LIBC = uclibc
 else ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)