package/Makefile.in: add detection for the lack of C library

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>
[yann.morin.1998@free.fr:
  - move as final else clause in existing conditional block
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit fda53f0791)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Thomas Petazzoni 2022-07-26 18:39:49 +02:00 committed by Peter Korsgaard
parent 4d8b9909a2
commit 370a7f2222

View File

@ -51,8 +51,12 @@ ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
LIBC = uclibc
else ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
LIBC = musl
else
else ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
LIBC = gnu
else
# This happens if there is a bug in Buildroot that allows an
# architecture configuration that isn't supported by any library.
$(error No C library enabled, this is not possible.)
endif
# The ABI suffix is a bit special on ARM, as it needs to be