[Buildroot] [PATCH 2/2] package/glibc: headers >= 5.4 needed on RISC-V 32-bit

Yann E. MORIN yann.morin.1998 at free.fr
Sun Oct 30 11:45:19 UTC 2022


Thomas, All,

On 2022-10-26 20:34 +0200, Thomas Petazzoni via buildroot spake thusly:
> 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 at bootlin.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/glibc/Config.in                 | 1 +
>  toolchain/toolchain-buildroot/Config.in | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/package/glibc/Config.in b/package/glibc/Config.in
> index b63f99b0b4..71c50504ac 100644
> --- a/package/glibc/Config.in
> +++ b/package/glibc/Config.in
> @@ -34,6 +34,7 @@ config BR2_PACKAGE_GLIBC_SUPPORTS
>  	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
> diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
> index 26d731d976..64f7892f98 100644
> --- a/toolchain/toolchain-buildroot/Config.in
> +++ b/toolchain/toolchain-buildroot/Config.in
> @@ -62,6 +62,10 @@ comment "glibc on RISC-V 64-bit needs a toolchain w/ headers >= 5.0"
>  	depends on BR2_RISCV_64
>  	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
>  
> +comment "glibc on RISC-V 32-bit needs a toolchain w/ headers >= 5.4"
> +	depends on BR2_RISCV_32
> +	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
> +
>  comment "glibc on ARC needs a toolchain w/ headers >= 5.1"
>  	depends on BR2_arc
>  	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
> -- 
> 2.37.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list