diff mbox series

[1/1] support/config-fragments: fix bootlin-x86-i686-musl

Message ID 20240521213814.763832-1-ju.o@free.fr
State Accepted
Headers show
Series [1/1] support/config-fragments: fix bootlin-x86-i686-musl | expand

Commit Message

Julien Olivain May 21, 2024, 9:38 p.m. UTC
Commit a8be4a04ad "support/config-fragments: replace
br-i386-pentium-mmx-musl" replaced this old toolchain by
bootlin-x86-i686-musl.

When using test-pkg with all toolchains, bootlin-x86-i686-musl is always
failing. The issue can be reproduced with for example:

    utils/test-pkg -a -p busybox

The issue can also be reproduced with a simple config like:

    cat > .config <<EOF
    BR2_i386=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
    BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_STABLE=y
    BR2_PACKAGE_BUSYBOX=y
    EOF
    make olddefconfig
    make

Compilation fail with output:

    Cannot execute cross-compiler '/i586-linux-gcc'

This issue happen is because the toolchain can never be selected.

The config fragment [1] selects BR2_i386 alone.

The target architecture variant default to i586 if target
architecture is i386. See [2].

Finally, the generated toolchain options includes a depends on
BR2_i386 and !BR2_x86_i586, making the toolchain always ignored.
See [3].

This commit fixes the issue by adding BR2_x86_i686=y to the config
fragment.

[1] https://gitlab.com/buildroot.org/buildroot/-/blob/a8be4a04ade8e695c5c4d4a825253d69e80693f9/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
[2] https://gitlab.com/buildroot.org/buildroot/-/blob/2024.02.2/arch/Config.in.x86?ref_type=tags#L38
[3] https://gitlab.com/buildroot.org/buildroot/-/blob/345ccb523e/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options#L5768-5770

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 support/config-fragments/autobuild/bootlin-x86-i686-musl.config | 1 +
 1 file changed, 1 insertion(+)

Comments

Romain Naour May 22, 2024, 11:58 a.m. UTC | #1
Hello Julien,

Le 21/05/2024 à 23:38, Julien Olivain a écrit :
> Commit a8be4a04ad "support/config-fragments: replace
> br-i386-pentium-mmx-musl" replaced this old toolchain by
> bootlin-x86-i686-musl.
> 
> When using test-pkg with all toolchains, bootlin-x86-i686-musl is always
> failing. The issue can be reproduced with for example:
> 
>     utils/test-pkg -a -p busybox
> 
> The issue can also be reproduced with a simple config like:
> 
>     cat > .config <<EOF
>     BR2_i386=y
>     BR2_TOOLCHAIN_EXTERNAL=y
>     BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
>     BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_STABLE=y
>     BR2_PACKAGE_BUSYBOX=y
>     EOF
>     make olddefconfig
>     make
> 
> Compilation fail with output:
> 
>     Cannot execute cross-compiler '/i586-linux-gcc'
> 
> This issue happen is because the toolchain can never be selected.
> 
> The config fragment [1] selects BR2_i386 alone.
> 
> The target architecture variant default to i586 if target
> architecture is i386. See [2].
> 
> Finally, the generated toolchain options includes a depends on
> BR2_i386 and !BR2_x86_i586, making the toolchain always ignored.
> See [3].
> 
> This commit fixes the issue by adding BR2_x86_i686=y to the config
> fragment.

You can also double check by looking to the fragment file generated by toolchain
builder:

https://toolchains.bootlin.com/downloads/releases/toolchains/x86-i686/fragments/x86-i686--musl--stable-2024.02-1.frag

Where BR2_x86_i686=y is indeed selected.

I added this additional link to the commit log.

Applied to master, thanks.

Best regards,
Romain


> 
> [1] https://gitlab.com/buildroot.org/buildroot/-/blob/a8be4a04ade8e695c5c4d4a825253d69e80693f9/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
> [2] https://gitlab.com/buildroot.org/buildroot/-/blob/2024.02.2/arch/Config.in.x86?ref_type=tags#L38
> [3] https://gitlab.com/buildroot.org/buildroot/-/blob/345ccb523e/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options#L5768-5770
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
>  support/config-fragments/autobuild/bootlin-x86-i686-musl.config | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/support/config-fragments/autobuild/bootlin-x86-i686-musl.config b/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
> index 2afe096f32d..697e9c625ec 100644
> --- a/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
> +++ b/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
> @@ -1,4 +1,5 @@
>  BR2_i386=y
> +BR2_x86_i686=y
>  BR2_TOOLCHAIN_EXTERNAL=y
>  BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
>  BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_STABLE=y
Peter Korsgaard June 3, 2024, 3:52 p.m. UTC | #2
>>>>> "Julien" == Julien Olivain <ju.o@free.fr> writes:

 > Commit a8be4a04ad "support/config-fragments: replace
 > br-i386-pentium-mmx-musl" replaced this old toolchain by
 > bootlin-x86-i686-musl.

 > When using test-pkg with all toolchains, bootlin-x86-i686-musl is always
 > failing. The issue can be reproduced with for example:

 >     utils/test-pkg -a -p busybox

 > The issue can also be reproduced with a simple config like:

 >     cat > .config <<EOF
 >     BR2_i386=y
 >     BR2_TOOLCHAIN_EXTERNAL=y
 >     BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
 >     BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_STABLE=y
 >     BR2_PACKAGE_BUSYBOX=y
 >     EOF
 >     make olddefconfig
 >     make

 > Compilation fail with output:

 >     Cannot execute cross-compiler '/i586-linux-gcc'

 > This issue happen is because the toolchain can never be selected.

 > The config fragment [1] selects BR2_i386 alone.

 > The target architecture variant default to i586 if target
 > architecture is i386. See [2].

 > Finally, the generated toolchain options includes a depends on
 > BR2_i386 and !BR2_x86_i586, making the toolchain always ignored.
 > See [3].

 > This commit fixes the issue by adding BR2_x86_i686=y to the config
 > fragment.

 > [1] https://gitlab.com/buildroot.org/buildroot/-/blob/a8be4a04ade8e695c5c4d4a825253d69e80693f9/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
 > [2] https://gitlab.com/buildroot.org/buildroot/-/blob/2024.02.2/arch/Config.in.x86?ref_type=tags#L38
 > [3] https://gitlab.com/buildroot.org/buildroot/-/blob/345ccb523e/toolchain/toolchain-external/toolchain-external-bootlin/Config.in.options#L5768-5770

 > Signed-off-by: Julien Olivain <ju.o@free.fr>

Committed to 2024.02.x, thanks.
diff mbox series

Patch

diff --git a/support/config-fragments/autobuild/bootlin-x86-i686-musl.config b/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
index 2afe096f32d..697e9c625ec 100644
--- a/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
+++ b/support/config-fragments/autobuild/bootlin-x86-i686-musl.config
@@ -1,4 +1,5 @@ 
 BR2_i386=y
+BR2_x86_i686=y
 BR2_TOOLCHAIN_EXTERNAL=y
 BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
 BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_X86_I686_MUSL_STABLE=y