public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Vagrant Cascadian <vagrant@debian.org>
Cc: 1003490@bugs.debian.org, u-boot@lists.denx.de,
	debian-riscv@lists.debian.org
Subject: Re: Bug#1003490: u-boot: FTBFS on arch:all with qemu-ppce500 target
Date: Wed, 26 Jan 2022 08:43:03 +0100	[thread overview]
Message-ID: <YfD7h8BuyE0oxUEB@aurel32.net> (raw)
In-Reply-To: <87fspbb3jp.fsf@ponder>

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

On 2022-01-25 19:04, Vagrant Cascadian wrote:
> On 2022-01-25, Vagrant Cascadian wrote:
> > On 2022-01-15, Aurelien Jarno wrote:
> >> On 2022-01-11 16:40, Vagrant Cascadian wrote:
> >>> On 2022-01-11, Lennart Sorensen wrote:
> >>> > On Mon, Jan 10, 2022 at 05:10:04PM -0800, Vagrant Cascadian wrote:
> >>> >> Something in the toolchain recently changed which causes u-boot arch:all
> >>> >> build to FTBFS... I suspect binutils, as building in "bookworm" still
> >>> >> works fine where binutils hasn't yet migrated.
> >>> >> 
> >>> >> On arch:all builds the qemu-ppce500 target is cross-compiled.
> >>> >> 
> >>> >> Full log:
> >>> >> 
> >>> >>   https://buildd.debian.org/status/fetch.php?pkg=u-boot&arch=all&ver=2022.01%2Bdfsg-1&stamp=1641860624&raw=0
> >>> >> 
> >>> >> The hopefully relevent lines from the build log:
> ...
> >>> >> {standard input}: Assembler messages:
> >>> >> {standard input}:127: Error: unrecognized opcode: `tlbre'
> >>> >> {standard input}:418: Error: unrecognized opcode: `tlbre'
> >>> >> {standard input}:821: Error: unrecognized opcode: `msync'
> >>> >> {standard input}:821: Error: unrecognized opcode: `tlbwe'
> >>> >> {standard input}:884: Error: unrecognized opcode: `tlbsx'
> >>> >> make[4]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.build:253: arch/powerpc/cpu/mpc85xx/tlb.o] Error 1
> >>> >> make[3]: *** [/<<PKGBUILDDIR>>/Makefile:1810: arch/powerpc/cpu/mpc85xx] Error 2
> >>> >> make[3]: *** Waiting for unfinished jobs....
> >>> >>   powerpc-linux-gnu-gcc -Wp,-MD,arch/powerpc/lib/.traps.o.d -nost
> > ...
> >>> The binutils versions appear to be:
> >>> 
> >>>   succeeding, bookworm 2.37-10.1
> >>>   failing, sid 2.37.50.20220106-2
> >>> 
> >>
> >> Yep, this is due to commit b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a on
> >> the binutils side [1], which changes the behavior of `.machine`
> >> directives to override, rather than augment, the base CPU. GCC is called
> >> with -Wa,-me500 to enable PowerPC e500 instructions on the assembler
> >> side, but as the default GCC machine is ppc, a `.set machine ppc` is
> >> emitted at the beginning of the assembly code.
> >>
> >> One option would be to force the CPU to e500 on the GCC side, however
> >> support for it has been removed. The options is therefore to force the
> >> machine in the assembly code. This is what the attached patch does.
> >
> > Somehow I missed that you had attached a patch! I will try to get this
> > tested and uploaded to Debian soon...
> 
> Your patch fixed building qemu-ppce500, but now I think we have a
> potentially similar problem with qemu-riscv64 and qemu-riscv64_smode:
> 
> /<<PKGBUILDDIR>>/arch/riscv/cpu/cpu.c: Assembler messages:
> /<<PKGBUILDDIR>>/arch/riscv/cpu/cpu.c:94: Error: unrecognized opcode
>   `csrs sstatus,a5'
> /<<PKGBUILDDIR>>/arch/riscv/cpu/cpu.c:95: Error: unrecognized opcode
>   `csrw 0x003,0'
> make[4]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.build:254:
>   arch/riscv/cpu/cpu.o] Error 1
> make[3]: *** [/<<PKGBUILDDIR>>/Makefile:1810: arch/riscv/cpu] Error 2
> make[3]: Leaving directory
>   '/<<PKGBUILDDIR>>/debian/build/qemu-riscv64_smode'

I guess this is due to:
http://lists.infradead.org/pipermail/linux-riscv/2022-January/011728.html

Unfortunately as the change has been done in a not yet released binutils
version, there is no way for the fix to have been done upstream yet.

Note that this also breaks at least linux and opensbi.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

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

      reply	other threads:[~2022-01-26 23:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87wnj7oz6b.fsf@ponder>
     [not found] ` <Yd4UYNsgSutYk/Zh@csclub.uwaterloo.ca>
     [not found]   ` <87sftt4wi4.fsf@ponder>
     [not found]     ` <YeLmODRhLSqiwb25@aurel32.net>
2022-01-26  1:03       ` Bug#1003490: u-boot: FTBFS on arch:all with qemu-ppce500 target Vagrant Cascadian
2022-01-26  3:04         ` Vagrant Cascadian
2022-01-26  7:43           ` Aurelien Jarno [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YfD7h8BuyE0oxUEB@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=1003490@bugs.debian.org \
    --cc=debian-riscv@lists.debian.org \
    --cc=u-boot@lists.denx.de \
    --cc=vagrant@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox