2b3f0153bb
Since glibc 2.33 (upstream commit 7a55dd3fb6d2c307a002a16776be84310b9c8989), headers >= 5.4.0 are needed to build glibc for RISC-V 32-bit. Indeed sysdeps/unix/sysv/linux/riscv/configure.ac contains: if test $libc_cv_riscv_int_abi = ilp32; then arch_minimum_kernel=5.4.0 fi In order to take into account this dependency, we add the appropriate logic in package/glibc/Config.in and toolchain/toolchain-buildroot/Config.in. This change means that if headers < 5.4.0 are selected, then no C library at all will be available for RISC-V 32-bit, as glibc is the only C library supporting RISC-V 32-bit currently. However, thanks to the recent addition of BR2_TOOLCHAIN_BUILDROOT_NONE, the choice...endchoice for the C library selection will not be empty, allowing the user to see the Config.in comment explaining why glibc can't be selected. Therefore, technically this commit does prevent from creating a configuration with RISC-V 32-bit and headers < 5.4.0, but it will have BR2_TOOLCHAIN_BUILDROOT_NONE=y, which is catched by package/Makefile.in, which aborts the build early on pointing out that the configuration is invalid. Fixes: http://autobuild.buildroot.net/results/5ca49b2732f68eccb5276e7112f7f496dcc514ee/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
73 lines
2.2 KiB
Plaintext
73 lines
2.2 KiB
Plaintext
config BR2_PACKAGE_GLIBC_ARCH_SUPPORTS
|
|
bool
|
|
default y if BR2_arm
|
|
default y if BR2_armeb
|
|
default y if BR2_aarch64
|
|
default y if BR2_aarch64_be
|
|
default y if BR2_i386
|
|
default y if BR2_mips
|
|
default y if BR2_mipsel
|
|
default y if BR2_mips64
|
|
default y if BR2_mips64el
|
|
default y if BR2_or1k
|
|
default y if BR2_powerpc
|
|
default y if BR2_powerpc64
|
|
default y if BR2_powerpc64le
|
|
default y if BR2_riscv
|
|
default y if BR2_s390x
|
|
default y if BR2_sh
|
|
default y if BR2_sparc64
|
|
default y if BR2_x86_64
|
|
default y if BR2_microblaze
|
|
default y if BR2_nios2
|
|
default y if BR2_arc && BR2_ARC_ATOMIC_EXT
|
|
depends on !BR2_powerpc_SPE
|
|
depends on BR2_RISCV_ISA_RVA || !BR2_riscv
|
|
depends on BR2_USE_MMU
|
|
|
|
config BR2_PACKAGE_GLIBC_SUPPORTS
|
|
bool
|
|
default y if BR2_PACKAGE_GLIBC_ARCH_SUPPORTS
|
|
# Make sure to keep these dependencies in sync with the
|
|
# Config.in comments in
|
|
# toolchain/toolchain-buildroot/Config.in
|
|
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
|
|
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 || !BR2_powerpc64le
|
|
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008
|
|
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 || !BR2_RISCV_32
|
|
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 || !BR2_RISCV_64
|
|
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1 || !BR2_arc
|
|
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4 || !BR2_or1k
|
|
|
|
if BR2_TOOLCHAIN_BUILDROOT_GLIBC
|
|
|
|
comment "Glibc Options"
|
|
|
|
config BR2_PACKAGE_GLIBC
|
|
bool
|
|
default y
|
|
select BR2_PACKAGE_LINUX_HEADERS
|
|
select BR2_TOOLCHAIN_HAS_SSP if BR2_PACKAGE_HOST_BINUTILS_SUPPORTS_CFI
|
|
help
|
|
https://www.gnu.org/software/libc/
|
|
|
|
config BR2_PACKAGE_GLIBC_KERNEL_COMPAT
|
|
bool "Enable compatibility shims to run on older kernels"
|
|
help
|
|
Say 'y' here if you plan on running your system on a kernel
|
|
older than the version used for the toolchain headers.
|
|
|
|
Enabling those compatibility shims may generate a slightly
|
|
bigger and slightly slower glibc library.
|
|
|
|
The oldest supported kernel version depends on the
|
|
architecture.
|
|
|
|
config BR2_PACKAGE_GLIBC_UTILS
|
|
bool "Install glibc utilities"
|
|
help
|
|
Enabling this option will compile and install the getconf,
|
|
ldconfig, ldd and locale glibc utilities for the target.
|
|
|
|
endif # BR2_TOOLCHAIN_BUILDROOT_GLIBC
|