Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] csky 8xx toolchain issue
@ 2021-08-26 19:39 Romain Naour
  2021-08-26 21:59 ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Romain Naour @ 2021-08-26 19:39 UTC (permalink / raw)
  To: Guo Ren; +Cc: Thomas Petazzoni, buildroot

Hello Guo,

I noticed that the csky 8xx toolchain doesn't build with a recent compiler.
It trigger an internal compiler error with the gcc installed on the host (Debian
buster, gcc 8.3.0-6); Fedora 33, gcc 10.3.1-1; Fedora 34, gcc 11.0.1-0.3).

[qemu_csky807_virt_defconfig]
https://gitlab.com/kubu93/buildroot/-/jobs/1535464974

[qemu_csky810_virt_defconfig]
https://gitlab.com/kubu93/buildroot/-/jobs/1535464975

[qemu_csky860_virt_defconfig]
https://gitlab.com/kubu93/buildroot/-/jobs/1535464976

The last know host compiler is gcc 6 from Debian stretch that is still used by
the gitlab-ci builds. It was not noticed before because csky is not tested by
Buildroot autobuilders.

Since csky is now upstream in gcc/binutils and the csky internal toolchain is
based on gcc 6, it would make sens to upgrade to an upstream version.

Can you update the csky toolchain?

I'm not sure what we have to do for the upcoming 2021.08 release.
Remove csky defconfigs and the gcc csky fork (select
BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT)?
Thomas, what do you think?

Best regards,
Romain
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] csky 8xx toolchain issue
  2021-08-26 19:39 [Buildroot] csky 8xx toolchain issue Romain Naour
@ 2021-08-26 21:59 ` Arnout Vandecappelle
  2021-10-02 15:58   ` Romain Naour
  0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2021-08-26 21:59 UTC (permalink / raw)
  To: Romain Naour, Guo Ren; +Cc: Thomas Petazzoni, buildroot



On 26/08/2021 21:39, Romain Naour wrote:
> Hello Guo,
> 
> I noticed that the csky 8xx toolchain doesn't build with a recent compiler.
> It trigger an internal compiler error with the gcc installed on the host (Debian
> buster, gcc 8.3.0-6); Fedora 33, gcc 10.3.1-1; Fedora 34, gcc 11.0.1-0.3).
> 
> [qemu_csky807_virt_defconfig]
> https://gitlab.com/kubu93/buildroot/-/jobs/1535464974
> 
> [qemu_csky810_virt_defconfig]
> https://gitlab.com/kubu93/buildroot/-/jobs/1535464975
> 
> [qemu_csky860_virt_defconfig]
> https://gitlab.com/kubu93/buildroot/-/jobs/1535464976
> 
> The last know host compiler is gcc 6 from Debian stretch that is still used by
> the gitlab-ci builds. It was not noticed before because csky is not tested by
> Buildroot autobuilders.
> 
> Since csky is now upstream in gcc/binutils and the csky internal toolchain is
> based on gcc 6, it would make sens to upgrade to an upstream version.
> 
> Can you update the csky toolchain?
> 
> I'm not sure what we have to do for the upcoming 2021.08 release.
> Remove csky defconfigs and the gcc csky fork (select
> BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT)?
> Thomas, what do you think?

 I think removing things is a bit heavy-handed. Our CI is still passing, so it's
only people who really build and use csky who see the problem. In a similar
vein, I think it's OK to still apply toolchain updates for csky this late in the
cycle.

 Regards,
 Arnout
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] csky 8xx toolchain issue
  2021-08-26 21:59 ` Arnout Vandecappelle
@ 2021-10-02 15:58   ` Romain Naour
  2021-10-02 18:25     ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Romain Naour @ 2021-10-02 15:58 UTC (permalink / raw)
  To: Arnout Vandecappelle, Guo Ren; +Cc: Thomas Petazzoni, buildroot

Hello Arnout,

Le 26/08/2021 à 23:59, Arnout Vandecappelle a écrit :
> 
> 
> On 26/08/2021 21:39, Romain Naour wrote:
>> Hello Guo,
>>
>> I noticed that the csky 8xx toolchain doesn't build with a recent compiler.
>> It trigger an internal compiler error with the gcc installed on the host (Debian
>> buster, gcc 8.3.0-6); Fedora 33, gcc 10.3.1-1; Fedora 34, gcc 11.0.1-0.3).
>>
>> [qemu_csky807_virt_defconfig]
>> https://gitlab.com/kubu93/buildroot/-/jobs/1535464974
>>
>> [qemu_csky810_virt_defconfig]
>> https://gitlab.com/kubu93/buildroot/-/jobs/1535464975
>>
>> [qemu_csky860_virt_defconfig]
>> https://gitlab.com/kubu93/buildroot/-/jobs/1535464976
>>
>> The last know host compiler is gcc 6 from Debian stretch that is still used by
>> the gitlab-ci builds. It was not noticed before because csky is not tested by
>> Buildroot autobuilders.
>>
>> Since csky is now upstream in gcc/binutils and the csky internal toolchain is
>> based on gcc 6, it would make sens to upgrade to an upstream version.
>>
>> Can you update the csky toolchain?
>>
>> I'm not sure what we have to do for the upcoming 2021.08 release.
>> Remove csky defconfigs and the gcc csky fork (select
>> BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT)?
>> Thomas, what do you think?
> 
>  I think removing things is a bit heavy-handed. Our CI is still passing, so it's
> only people who really build and use csky who see the problem. In a similar
> vein, I think it's OK to still apply toolchain updates for csky this late in the
> cycle.

The csky toolchain is still broken with recent host compiler and our CI will
switch to Debian bullseye soon.

I tried to build with the latest upstream version of binutils, gcc and glibc and
nothing build.

upstream gcc-11 doesn't support csky610 and csky860 needed for
qemu_csky610_virt_defconfig and qemu_csky860_virt_defconfig.

qemu_csky807_virt_defconfig and qemu_csky810_virt_defconfig fail to build glibc
with the following error:

glibc-2.34-9-g9acab0bba6a5a57323b1f94bf95b21618a9e5aa4/build/elf/librtld.os: in
function `__sync_fetch_and_add_2':

build/host-gcc-initial-11.2.0/build/csky-buildroot-linux-gnuabiv2/libgcc/../../../libgcc/config/csky/linux-atomic.c:116:
undefined reference to `__kernel_cmpxchg'

But even if the build succeeded there is no qemu binary to do a runtime test.

Best regards,
Romain

> 
>  Regards,
>  Arnout
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] csky 8xx toolchain issue
  2021-10-02 15:58   ` Romain Naour
@ 2021-10-02 18:25     ` Thomas Petazzoni
  2021-10-02 20:21       ` Romain Naour
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2021-10-02 18:25 UTC (permalink / raw)
  To: Romain Naour; +Cc: Guo Ren, buildroot

Hello Romain,

On Sat, 2 Oct 2021 17:58:24 +0200
Romain Naour <romain.naour@gmail.com> wrote:

> The csky toolchain is still broken with recent host compiler and our CI will
> switch to Debian bullseye soon.
> 
> I tried to build with the latest upstream version of binutils, gcc and glibc and
> nothing build.
> 
> upstream gcc-11 doesn't support csky610 and csky860 needed for
> qemu_csky610_virt_defconfig and qemu_csky860_virt_defconfig.
> 
> qemu_csky807_virt_defconfig and qemu_csky810_virt_defconfig fail to build glibc
> with the following error:
> 
> glibc-2.34-9-g9acab0bba6a5a57323b1f94bf95b21618a9e5aa4/build/elf/librtld.os: in
> function `__sync_fetch_and_add_2':
> 
> build/host-gcc-initial-11.2.0/build/csky-buildroot-linux-gnuabiv2/libgcc/../../../libgcc/config/csky/linux-atomic.c:116:
> undefined reference to `__kernel_cmpxchg'
> 
> But even if the build succeeded there is no qemu binary to do a runtime test.

Considering these issues and the fact that there has been no updates in
terms of C-SKY support for a long time, I think we should consider
dropping support for the C-SKY CPU architecture.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] csky 8xx toolchain issue
  2021-10-02 18:25     ` Thomas Petazzoni
@ 2021-10-02 20:21       ` Romain Naour
  2021-10-02 20:34         ` Yann E. MORIN
  0 siblings, 1 reply; 7+ messages in thread
From: Romain Naour @ 2021-10-02 20:21 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Guo Ren, buildroot

Hello Thomas,

Le 02/10/2021 à 20:25, Thomas Petazzoni a écrit :
> Hello Romain,
> 
> On Sat, 2 Oct 2021 17:58:24 +0200
> Romain Naour <romain.naour@gmail.com> wrote:
> 
>> The csky toolchain is still broken with recent host compiler and our CI will
>> switch to Debian bullseye soon.
>>
>> I tried to build with the latest upstream version of binutils, gcc and glibc and
>> nothing build.
>>
>> upstream gcc-11 doesn't support csky610 and csky860 needed for
>> qemu_csky610_virt_defconfig and qemu_csky860_virt_defconfig.
>>
>> qemu_csky807_virt_defconfig and qemu_csky810_virt_defconfig fail to build glibc
>> with the following error:
>>
>> glibc-2.34-9-g9acab0bba6a5a57323b1f94bf95b21618a9e5aa4/build/elf/librtld.os: in
>> function `__sync_fetch_and_add_2':
>>
>> build/host-gcc-initial-11.2.0/build/csky-buildroot-linux-gnuabiv2/libgcc/../../../libgcc/config/csky/linux-atomic.c:116:
>> undefined reference to `__kernel_cmpxchg'
>>
>> But even if the build succeeded there is no qemu binary to do a runtime test.
> 
> Considering these issues and the fact that there has been no updates in
> terms of C-SKY support for a long time, I think we should consider
> dropping support for the C-SKY CPU architecture.

csky860 will be supported by gcc 12:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=db92bd223e3957ee58b5a0c0fffd8b7766f1def3

But no sing of ck610.

This cpu architecture is really young so the toolchain support needs to be
maintained regularly. Especially since there is not upstream Qemu support to do
a runtime test.

For example, we know that ARC architecture is maintained by Synopsys because it
require a toolchain based on forked version of binutils and gcc. Also most of
the upstream work has been done over the years and backported/maintained into
Buildroot.

I don't like to have to remove csky due to toolchain build issues...

Best regards,
Romain


> 
> Best regards,
> 
> Thomas
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] csky 8xx toolchain issue
  2021-10-02 20:21       ` Romain Naour
@ 2021-10-02 20:34         ` Yann E. MORIN
  2021-10-02 20:44           ` Romain Naour
  0 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2021-10-02 20:34 UTC (permalink / raw)
  To: Romain Naour; +Cc: Guo Ren, Thomas Petazzoni, buildroot

Romain, All,

On 2021-10-02 22:21 +0200, Romain Naour spake thusly:
> Le 02/10/2021 à 20:25, Thomas Petazzoni a écrit :
> > On Sat, 2 Oct 2021 17:58:24 +0200
> > Romain Naour <romain.naour@gmail.com> wrote:
> >> The csky toolchain is still broken with recent host compiler and our CI will
> >> switch to Debian bullseye soon.
[--SNIP--]
> > Considering these issues and the fact that there has been no updates in
> > terms of C-SKY support for a long time, I think we should consider
> > dropping support for the C-SKY CPU architecture.
> csky860 will be supported by gcc 12:
> https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=db92bd223e3957ee58b5a0c0fffd8b7766f1def3

In the meantime, what about just:

    diff --git a/arch/Config.in b/arch/Config.in
    index 1853e26bb4..ab40294ddc 100644
    --- a/arch/Config.in
    +++ b/arch/Config.in
    @@ -77,6 +77,7 @@ config BR2_aarch64_be
     
     config BR2_csky
     	bool "csky"
    +	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT
     	select BR2_ARCH_HAS_MMU_MANDATORY
     	# Most variants are supported by gcc-9+, except one that is
     	# handled as a special exception in package/gcc/Config.in.host

When we introduce gcc 12, we can move that down to the individual
variants if need be...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Buildroot] csky 8xx toolchain issue
  2021-10-02 20:34         ` Yann E. MORIN
@ 2021-10-02 20:44           ` Romain Naour
  0 siblings, 0 replies; 7+ messages in thread
From: Romain Naour @ 2021-10-02 20:44 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Guo Ren, Thomas Petazzoni, buildroot

Hello Yann,

Le 02/10/2021 à 22:34, Yann E. MORIN a écrit :
> Romain, All,
> 
> On 2021-10-02 22:21 +0200, Romain Naour spake thusly:
>> Le 02/10/2021 à 20:25, Thomas Petazzoni a écrit :
>>> On Sat, 2 Oct 2021 17:58:24 +0200
>>> Romain Naour <romain.naour@gmail.com> wrote:
>>>> The csky toolchain is still broken with recent host compiler and our CI will
>>>> switch to Debian bullseye soon.
> [--SNIP--]
>>> Considering these issues and the fact that there has been no updates in
>>> terms of C-SKY support for a long time, I think we should consider
>>> dropping support for the C-SKY CPU architecture.
>> csky860 will be supported by gcc 12:
>> https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=db92bd223e3957ee58b5a0c0fffd8b7766f1def3
> 
> In the meantime, what about just:
> 
>     diff --git a/arch/Config.in b/arch/Config.in
>     index 1853e26bb4..ab40294ddc 100644
>     --- a/arch/Config.in
>     +++ b/arch/Config.in
>     @@ -77,6 +77,7 @@ config BR2_aarch64_be
>      
>      config BR2_csky
>      	bool "csky"
>     +	select BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT
>      	select BR2_ARCH_HAS_MMU_MANDATORY
>      	# Most variants are supported by gcc-9+, except one that is
>      	# handled as a special exception in package/gcc/Config.in.host
> 
> When we introduce gcc 12, we can move that down to the individual
> variants if need be...

At least I can build the csky610 toolchain using binutils and gcc csky fork but
building the 5.0.12 kernel requires a small patch to build with host gcc >= 10
(https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=35b34d264cb347909ec89d9fa895900035d5438c)

https://gitlab.com/kubu93/buildroot/-/jobs/1635588173

But with the same toolchain, the build fail with an internal compiler error:

https://gitlab.com/kubu93/buildroot/-/jobs/1635588174
https://gitlab.com/kubu93/buildroot/-/jobs/1635588175
https://gitlab.com/kubu93/buildroot/-/jobs/1635588176

But even with BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT, we have to remove some
qemu_csky* defconfig to not trigger a build job in gitlab.

Best regards,
Romain


> 
> Regards,
> Yann E. MORIN.
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-02 20:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-26 19:39 [Buildroot] csky 8xx toolchain issue Romain Naour
2021-08-26 21:59 ` Arnout Vandecappelle
2021-10-02 15:58   ` Romain Naour
2021-10-02 18:25     ` Thomas Petazzoni
2021-10-02 20:21       ` Romain Naour
2021-10-02 20:34         ` Yann E. MORIN
2021-10-02 20:44           ` Romain Naour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox