All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] buildman: Switch ARC toolchain to the upstream version
@ 2023-07-07 21:04 Alexey Brodkin
  2023-07-07 22:29 ` Tom Rini
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Alexey Brodkin @ 2023-07-07 21:04 UTC (permalink / raw)
  To: u-boot; +Cc: Alexey Brodkin, Simon Glass, Tom Rini

Back in the day we relied a lot on Synopsys own build of the GNU tools
for ARC processors, but since then we worked hard on getting all our changes
upstream and for a couple of years now we have ARCompact (AKA ARCv1)
and ARCv2 processors supported very well in upstream GCC, Binutils, GDB etc.

And so there's no need to use Synopsys forks any longer, thus we remove
all the references to that form and use upstream components as majority
of other architectures in U-Boot.

Thanks to Tom for pointing to that left-over!

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
---
 tools/buildman/bsettings.py | 1 -
 tools/buildman/buildman.rst | 6 ------
 tools/docker/Dockerfile     | 3 +--
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/tools/buildman/bsettings.py b/tools/buildman/bsettings.py
index 0eb894a558..029c401fd2 100644
--- a/tools/buildman/bsettings.py
+++ b/tools/buildman/bsettings.py
@@ -91,7 +91,6 @@ other = /
 [toolchain-prefix]
 # name = path to prefix
 # e.g. x86 = /opt/gcc-4.6.3-nolibc/x86_64-linux/bin/x86_64-linux-
-# arc = /opt/arc/arc_gnu_2021.03_prebuilt_elf32_le_linux_install/bin/arc-elf32-
 
 [toolchain-alias]
 # arch = alias
diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst
index c8b0db3d8b..6808727eb4 100644
--- a/tools/buildman/buildman.rst
+++ b/tools/buildman/buildman.rst
@@ -475,10 +475,6 @@ Setting up
       sudo mkdir -p /toolchains
       sudo mv ~/.buildman-toolchains/*/* /toolchains/
 
-   For those not available from kernel.org, download from the following links:
-
-   - `Arc Toolchain`_
-
    Buildman should now be set up to use your new toolchain.
 
    At the time of writing, U-Boot has these architectures:
@@ -1342,8 +1338,6 @@ Thanks to Grant Grundler <grundler@chromium.org> for his ideas for improving
 the build speed by building all commits for a board instead of the other
 way around.
 
-.. _`Arc Toolchain`: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2021.03-release/arc_gnu_2021.03_prebuilt_elf32_le_linux_install.tar.gz
-
 .. sectionauthor:: Simon Glass
 .. sectionauthor:: Copyright (c) 2013 The Chromium OS Authors.
 .. sectionauthor:: sjg@chromium.org
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 9804b55ddd..fa03f3f2a7 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -16,6 +16,7 @@ RUN echo deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main | tee /etc/
 
 # Manually install the kernel.org "Crosstool" based toolchains for gcc-12.2.0
 RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ
+RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-arc-linux.tar.xz | tar -C /opt -xJ
 RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-arm-linux-gnueabi.tar.xz | tar -C /opt -xJ
 RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-i386-linux.tar.xz | tar -C /opt -xJ
 RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/12.2.0/x86_64-gcc-12.2.0-nolibc-m68k-linux.tar.xz | tar -C /opt -xJ
@@ -29,7 +30,6 @@ RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_
 
 # Manually install other toolchains
 RUN wget -O - https://github.com/foss-xtensa/toolchain/releases/download/2020.07/x86_64-2020.07-xtensa-dc233c-elf.tar.gz | tar -C /opt -xz
-RUN wget -O - https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2021.03-release/arc_gnu_2021.03_prebuilt_uclibc_le_archs_linux_install.tar.gz | tar --no-same-owner -C /opt -xz
 
 # Update and install things from apt now
 RUN apt-get update && apt-get install -y \
@@ -279,7 +279,6 @@ RUN virtualenv -p /usr/bin/python3 /tmp/venv && \
 # Create the buildman config file
 RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman
 RUN /bin/echo -e "kernelorg = /opt/gcc-12.2.0-nolibc/*" >> ~/.buildman
-RUN /bin/echo -e "arc = /opt/arc_gnu_2021.03_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman
 RUN /bin/echo -e "\n[toolchain-prefix]\nxtensa = /opt/2020.07/xtensa-dc233c-elf/bin/xtensa-dc233c-elf-" >> ~/.buildman;
 RUN /bin/echo -e "\n[toolchain-alias]\nsh = sh2" >> ~/.buildman
 RUN /bin/echo -e "\nsandbox = x86_64" >> ~/.buildman
-- 
2.34.1


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

* Re: [PATCH] buildman: Switch ARC toolchain to the upstream version
  2023-07-07 21:04 [PATCH] buildman: Switch ARC toolchain to the upstream version Alexey Brodkin
@ 2023-07-07 22:29 ` Tom Rini
  2023-07-09  3:38 ` Simon Glass
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2023-07-07 22:29 UTC (permalink / raw)
  To: Alexey Brodkin; +Cc: u-boot, Simon Glass

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

On Fri, Jul 07, 2023 at 10:04:53PM +0100, Alexey Brodkin wrote:

> Back in the day we relied a lot on Synopsys own build of the GNU tools
> for ARC processors, but since then we worked hard on getting all our changes
> upstream and for a couple of years now we have ARCompact (AKA ARCv1)
> and ARCv2 processors supported very well in upstream GCC, Binutils, GDB etc.
> 
> And so there's no need to use Synopsys forks any longer, thus we remove
> all the references to that form and use upstream components as majority
> of other architectures in U-Boot.
> 
> Thanks to Tom for pointing to that left-over!
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH] buildman: Switch ARC toolchain to the upstream version
  2023-07-07 21:04 [PATCH] buildman: Switch ARC toolchain to the upstream version Alexey Brodkin
  2023-07-07 22:29 ` Tom Rini
@ 2023-07-09  3:38 ` Simon Glass
  2023-07-12 22:02 ` Tom Rini
  2023-07-21  1:29 ` Tom Rini
  3 siblings, 0 replies; 7+ messages in thread
From: Simon Glass @ 2023-07-09  3:38 UTC (permalink / raw)
  To: Alexey Brodkin; +Cc: u-boot, Tom Rini

On Fri, 7 Jul 2023 at 15:05, Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote:
>
> Back in the day we relied a lot on Synopsys own build of the GNU tools
> for ARC processors, but since then we worked hard on getting all our changes
> upstream and for a couple of years now we have ARCompact (AKA ARCv1)
> and ARCv2 processors supported very well in upstream GCC, Binutils, GDB etc.
>
> And so there's no need to use Synopsys forks any longer, thus we remove
> all the references to that form and use upstream components as majority
> of other architectures in U-Boot.
>
> Thanks to Tom for pointing to that left-over!
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  tools/buildman/bsettings.py | 1 -
>  tools/buildman/buildman.rst | 6 ------
>  tools/docker/Dockerfile     | 3 +--
>  3 files changed, 1 insertion(+), 9 deletions(-)

Nice!

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* Re: [PATCH] buildman: Switch ARC toolchain to the upstream version
  2023-07-07 21:04 [PATCH] buildman: Switch ARC toolchain to the upstream version Alexey Brodkin
  2023-07-07 22:29 ` Tom Rini
  2023-07-09  3:38 ` Simon Glass
@ 2023-07-12 22:02 ` Tom Rini
  2023-07-21  1:29 ` Tom Rini
  3 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2023-07-12 22:02 UTC (permalink / raw)
  To: Alexey Brodkin; +Cc: u-boot, Simon Glass

[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]

On Fri, Jul 07, 2023 at 10:04:53PM +0100, Alexey Brodkin wrote:

> Back in the day we relied a lot on Synopsys own build of the GNU tools
> for ARC processors, but since then we worked hard on getting all our changes
> upstream and for a couple of years now we have ARCompact (AKA ARCv1)
> and ARCv2 processors supported very well in upstream GCC, Binutils, GDB etc.
> 
> And so there's no need to use Synopsys forks any longer, thus we remove
> all the references to that form and use upstream components as majority
> of other architectures in U-Boot.
> 
> Thanks to Tom for pointing to that left-over!
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

So I tested this locally and I have a problem:
Building current source for 1 boards (1 thread, 16 jobs per thread)
       arc:  +   hsdk_4xd
+(hsdk_4xd) arc-linux-gcc: error: unrecognized argument in option '-mcpu=hs4x_rel31'
+(hsdk_4xd) arc-linux-gcc: note: valid arguments to '-mcpu=' are: arc600 arc600_mul32x16 arc600_mul64 arc600_norm arc601 arc601_mul32x16 arc601_mul64 arc601_norm arc700 arcem archs em em4 em4_dmips em4_fpuda em4_fpus em_mini hs hs34 hs38 hs38_linux hs4x hs4xd nps400 quarkse_em
+(hsdk_4xd) make[2]: *** [scripts/Makefile.autoconf:82: u-boot.cfg] Error 1
+(hsdk_4xd) make[2]: *** [scripts/Makefile.autoconf:52: include/autoconf.mk.dep] Error 1
+(hsdk_4xd) make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
+(hsdk_4xd) make: *** [Makefile:177: sub-make] Error 2

I assume it's a straight-forward fix.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH] buildman: Switch ARC toolchain to the upstream version
  2023-07-07 21:04 [PATCH] buildman: Switch ARC toolchain to the upstream version Alexey Brodkin
                   ` (2 preceding siblings ...)
  2023-07-12 22:02 ` Tom Rini
@ 2023-07-21  1:29 ` Tom Rini
  3 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2023-07-21  1:29 UTC (permalink / raw)
  To: Alexey Brodkin; +Cc: u-boot, Simon Glass

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

On Fri, Jul 07, 2023 at 10:04:53PM +0100, Alexey Brodkin wrote:

> Back in the day we relied a lot on Synopsys own build of the GNU tools
> for ARC processors, but since then we worked hard on getting all our changes
> upstream and for a couple of years now we have ARCompact (AKA ARCv1)
> and ARCv2 processors supported very well in upstream GCC, Binutils, GDB etc.
> 
> And so there's no need to use Synopsys forks any longer, thus we remove
> all the references to that form and use upstream components as majority
> of other architectures in U-Boot.
> 
> Thanks to Tom for pointing to that left-over!
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH] buildman: Switch ARC toolchain to the upstream version
  2023-07-13 14:07 Alexey Brodkin
@ 2023-07-13 14:48 ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2023-07-13 14:48 UTC (permalink / raw)
  To: Alexey Brodkin; +Cc: u-boot, Simon Glass

[-- Attachment #1: Type: text/plain, Size: 3191 bytes --]

On Thu, Jul 13, 2023 at 02:07:32PM +0000, Alexey Brodkin wrote:
> Hi Tom,
> 
> > > Back in the day we relied a lot on Synopsys own build of the GNU tools
> > > for ARC processors, but since then we worked hard on getting all our changes
> > > upstream and for a couple of years now we have ARCompact (AKA ARCv1)
> > > and ARCv2 processors supported very well in upstream GCC, Binutils, GDB etc.
> > >
> > > And so there's no need to use Synopsys forks any longer, thus we remove
> > > all the references to that form and use upstream components as majority
> > > of other architectures in U-Boot.
> > >
> > > Thanks to Tom for pointing to that left-over!
> > >
> > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > > Cc: Simon Glass <sjg@chromium.org>
> > > Cc: Tom Rini <trini@konsulko.com>
> > > Reviewed-by: Tom Rini <trini@konsulko.com>
> > > Reviewed-by: Simon Glass <sjg@chromium.org>
> > 
> > So I tested this locally and I have a problem:
> > Building current source for 1 boards (1 thread, 16 jobs per thread)
> >        arc:  +   hsdk_4xd
> > +(hsdk_4xd) arc-linux-gcc: error: unrecognized argument in option '-mcpu=hs4x_rel31'
> > +(hsdk_4xd) arc-linux-gcc: note: valid arguments to '-mcpu=' are: arc600 arc600_mul32x16 arc600_mul64 arc600_norm arc601 arc601_mul32x16 arc601_mul64 arc601_norm arc700 arcem archs em em4 em4_dmips em4_fpuda em4_fpus em_mini hs hs34 hs38 hs38_linux hs4x hs4xd nps400 quarkse_em
> > +(hsdk_4xd) make[2]: *** [scripts/Makefile.autoconf:82: u-boot.cfg] Error 1
> > +(hsdk_4xd) make[2]: *** [scripts/Makefile.autoconf:52: include/autoconf.mk.dep] Error 1
> > +(hsdk_4xd) make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
> > +(hsdk_4xd) make: *** [Makefile:177: sub-make] Error 2
> > 
> > I assume it's a straight-forward fix.
> 
> Good catch. I did run test on most of ARC boards except this one
> as I forgot that it really differs from the original "hsdk" :)
> 
> So, that failure happens because of missing patch on GCC12, which
> adds that new "mcpu", see [1]. It's now a part of GCC 13 and so I would suggest
> the following "fix":
> ------------------------>8-----------------------
> diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
> index 0ecd8458b9..e34d8db25c 100644
> --- a/tools/buildman/toolchain.py
> +++ b/tools/buildman/toolchain.py
> @@ -499,7 +499,7 @@ class Toolchains:
>          if arch == 'aarch64':
>              arch = 'arm64'
>          base = 'https://www.kernel.org/pub/tools/crosstool/files/bin'
> -        versions = ['12.2.0', '11.1.0']
> +        versions = ['13.1.0', '12.2.0', '11.1.0']
>          links = []
>          for version in versions:
>              url = '%s/%s/%s/' % (base, arch, version)
> ------------------------>8-----------------------
> 
> I.e. bumping default toolchains to GCC 13.x.
> Do you think it's doable at this point?
> 
> [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7501eec65c60701f72621d04eeb5342bad2fe4fb

Bump to 13.1, OK, well, it's early enough in the cycle that we should
see what falls down with that, yes.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH] buildman: Switch ARC toolchain to the upstream version
@ 2023-07-13 14:07 Alexey Brodkin
  2023-07-13 14:48 ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Alexey Brodkin @ 2023-07-13 14:07 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot, Simon Glass

Hi Tom,

> > Back in the day we relied a lot on Synopsys own build of the GNU tools
> > for ARC processors, but since then we worked hard on getting all our changes
> > upstream and for a couple of years now we have ARCompact (AKA ARCv1)
> > and ARCv2 processors supported very well in upstream GCC, Binutils, GDB etc.
> >
> > And so there's no need to use Synopsys forks any longer, thus we remove
> > all the references to that form and use upstream components as majority
> > of other architectures in U-Boot.
> >
> > Thanks to Tom for pointing to that left-over!
> >
> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Tom Rini <trini@konsulko.com>
> > Reviewed-by: Tom Rini <trini@konsulko.com>
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> So I tested this locally and I have a problem:
> Building current source for 1 boards (1 thread, 16 jobs per thread)
>        arc:  +   hsdk_4xd
> +(hsdk_4xd) arc-linux-gcc: error: unrecognized argument in option '-mcpu=hs4x_rel31'
> +(hsdk_4xd) arc-linux-gcc: note: valid arguments to '-mcpu=' are: arc600 arc600_mul32x16 arc600_mul64 arc600_norm arc601 arc601_mul32x16 arc601_mul64 arc601_norm arc700 arcem archs em em4 em4_dmips em4_fpuda em4_fpus em_mini hs hs34 hs38 hs38_linux hs4x hs4xd nps400 quarkse_em
> +(hsdk_4xd) make[2]: *** [scripts/Makefile.autoconf:82: u-boot.cfg] Error 1
> +(hsdk_4xd) make[2]: *** [scripts/Makefile.autoconf:52: include/autoconf.mk.dep] Error 1
> +(hsdk_4xd) make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
> +(hsdk_4xd) make: *** [Makefile:177: sub-make] Error 2
> 
> I assume it's a straight-forward fix.

Good catch. I did run test on most of ARC boards except this one
as I forgot that it really differs from the original "hsdk" :)

So, that failure happens because of missing patch on GCC12, which
adds that new "mcpu", see [1]. It's now a part of GCC 13 and so I would suggest
the following "fix":
------------------------>8-----------------------
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index 0ecd8458b9..e34d8db25c 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -499,7 +499,7 @@ class Toolchains:
         if arch == 'aarch64':
             arch = 'arm64'
         base = 'https://www.kernel.org/pub/tools/crosstool/files/bin'
-        versions = ['12.2.0', '11.1.0']
+        versions = ['13.1.0', '12.2.0', '11.1.0']
         links = []
         for version in versions:
             url = '%s/%s/%s/' % (base, arch, version)
------------------------>8-----------------------

I.e. bumping default toolchains to GCC 13.x.
Do you think it's doable at this point?

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7501eec65c60701f72621d04eeb5342bad2fe4fb

-Alexey

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

end of thread, other threads:[~2023-07-21  1:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-07 21:04 [PATCH] buildman: Switch ARC toolchain to the upstream version Alexey Brodkin
2023-07-07 22:29 ` Tom Rini
2023-07-09  3:38 ` Simon Glass
2023-07-12 22:02 ` Tom Rini
2023-07-21  1:29 ` Tom Rini
2023-07-13 14:07 Alexey Brodkin
2023-07-13 14:48 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.