Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA1DFC433EF for ; Wed, 26 Jan 2022 23:24:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A6A298313B; Thu, 27 Jan 2022 00:24:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aurel32.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=aurel32.net header.i=@aurel32.net header.b="dj6tz6qL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 33C9F830F4; Wed, 26 Jan 2022 08:43:15 +0100 (CET) Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0278082E08 for ; Wed, 26 Jan 2022 08:43:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aurel32.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=aurelien@aurel32.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=bbCBcR2DVAPFNrOTA0mZ2IBRf+eIdpbik9XKiWSh7fM=; b=dj6tz6qLQpTAv4SZ8ig+GlK1WX N1iUbAF+RuZwIMDICMKzgi7uMq8SxJNdcagQD6iD9JsyK9L8yIHwNNpNUrutYco6iQfYFgVDppgdJ OrFB63ikRuEuQc2pvcsYQhj1Mftsxw/0qKKYo78KYS/4kkSedUzWPf2ri6GxYGPtd0ERLDJ2VD9UV CkHCTPLOIX4zTDftNWMk2CYpzaRQeJvJfzqoPK3/2drssgv+M+YD9peeBLsfdm5r1gf8vzk7b5/D1 9KESJO8FIMaO7VOjPNNjAKqUTqnclWWvvScNgEXFm5AA0HXmOuoyMRpYq5iXruSgkOxn5PchjQhhJ sMmYlDxA==; Received: from [2a01:e34:ec5d:a741:8a4c:7c4e:dc4c:1787] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nCcxL-00GTor-VZ; Wed, 26 Jan 2022 08:43:03 +0100 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.95) (envelope-from ) id 1nCcxL-005Aq5-Hk; Wed, 26 Jan 2022 08:43:03 +0100 Date: Wed, 26 Jan 2022 08:43:03 +0100 From: Aurelien Jarno To: Vagrant Cascadian 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 Message-ID: References: <87wnj7oz6b.fsf@ponder> <87sftt4wi4.fsf@ponder> <87ilu7b96a.fsf@ponder> <87fspbb3jp.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GP1PVu3ppNfk+Pa6" Content-Disposition: inline In-Reply-To: <87fspbb3jp.fsf@ponder> User-Agent: Mutt/2.1.4 (2021-12-11) X-Mailman-Approved-At: Thu, 27 Jan 2022 00:24:06 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean --GP1PVu3ppNfk+Pa6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 ar= ch:all > >>> >> build to FTBFS... I suspect binutils, as building in "bookworm" st= ill > >>> >> works fine where binutils hasn't yet migrated. > >>> >>=20 > >>> >> On arch:all builds the qemu-ppce500 target is cross-compiled. > >>> >>=20 > >>> >> Full log: > >>> >>=20 > >>> >> https://buildd.debian.org/status/fetch.php?pkg=3Du-boot&arch=3Da= ll&ver=3D2022.01%2Bdfsg-1&stamp=3D1641860624&raw=3D0 > >>> >>=20 > >>> >> 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]: *** [/<>/scripts/Makefile.build:253: arch/po= werpc/cpu/mpc85xx/tlb.o] Error 1 > >>> >> make[3]: *** [/<>/Makefile:1810: arch/powerpc/cpu/mpc= 85xx] 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: > >>>=20 > >>> succeeding, bookworm 2.37-10.1 > >>> failing, sid 2.37.50.20220106-2 > >>>=20 > >> > >> 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 call= ed > >> 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... >=20 > Your patch fixed building qemu-ppce500, but now I think we have a > potentially similar problem with qemu-riscv64 and qemu-riscv64_smode: >=20 > /<>/arch/riscv/cpu/cpu.c: Assembler messages: > /<>/arch/riscv/cpu/cpu.c:94: Error: unrecognized opcode > `csrs sstatus,a5' > /<>/arch/riscv/cpu/cpu.c:95: Error: unrecognized opcode > `csrw 0x003,0' > make[4]: *** [/<>/scripts/Makefile.build:254: > arch/riscv/cpu/cpu.o] Error 1 > make[3]: *** [/<>/Makefile:1810: arch/riscv/cpu] Error 2 > make[3]: Leaving directory > '/<>/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. --=20 Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net --GP1PVu3ppNfk+Pa6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEUryGlb40+QrX1Ay4E4jA+JnoM2sFAmHw+4UACgkQE4jA+Jno M2uOtw/7BvHqKDpvXUCf84bF2ADXo0oBFnfip8mSRWDDtYjYZ0ekrNHaVrhPHIUF QpBrKNE02hqGK+2N2hT2oOrVwqrxGa/qJRgLFxE97IY6tv1b0UF2XJp/4wYZn3Bv 1NhShT5U2VpcglWAJGlC6lIg+GWb+PTGR49ywjo5N3iF6nUsnEWb69+BqakVt9k1 /KK1vPEWhwzb2c3Zr4K/dbwfKt9A+AYLw7lKqcO7h9kYPq6P0nYDzp9zNNsEB8/+ wTw9r55UVC4xUA3tMVqeZjQADL23CAhiMANANR+jZLJANZdhz0h6VC+luBGaUXhA mWdisuEJ+H1i8LQDLfeiKe2s6SOliMt1DsB/EGgEjmMuRUPQ+IKNKCiDYTuA7JOo TiCyCQBmDvy8FV+lACVvljBjUrALSIRkim2PgNLSZvpuGSis06jfQRolXFhph3LW 3NTKVvxwzJ/tulfFPkFiVnCt9mbAX1Itw0oEPKRbNwvazgBHk1naFtgHLEqsLzSU pjKXfVUPaXdZzs0FMs/75Y/LoBo3imZOZ2E4RAkI0L8iVpsia/1cvLBaSFp9UnMw tAixlDFZY8cnLLjcjYAzla078ZjXRq4N5HxgSQx7fsYBszEbMu7Y6Ov/VyNmdwkZ eeH7w6LhQcCUO7H/sIUG4XhhlyzTGly0LMkwyw888EqEYFhi7sQ= =BCdY -----END PGP SIGNATURE----- --GP1PVu3ppNfk+Pa6--