Package: binutils
Version: 2.37.90.20220123-2
Severity: important
Since the update from binutils 2.37 to this snapshot, linux no longer
builds for powerpc or ppc64 due to unrecognised instructions.
For ppc64, linux is built with the compiler options:
-mtune=power7 -mcpu=power5 -mno-altivec -mno-vsx
so the generated assembly starts with ".machine power5". But because
the kernel does need to conditionally use Altivec and other
extensions, it also uses the options:
-Wa,-maltivec -Wa,-mpower4 -Wa,-many
This is rather strange but used to work. It seems to have been
intentionally changed by commit b25f942e18d6 "PowerPC: ignore sticky
options for .machine" in binutils. Can you find out whether there is
any possibility of this being reverted?
Ben.
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'oldstable-updates'), (500, 'unstable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.15.0-3-amd64 (SMP w/2 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages binutils depends on:
ii binutils-common 2.37.90.20220123-2
ii binutils-x86-64-linux-gnu 2.37.90.20220123-2
ii libbinutils 2.37.90.20220123-2
binutils recommends no packages.
Versions of packages binutils suggests:
ii binutils-doc 2.37.90.20220123-2
-- debconf-show failed
Acknowledgement sent
to Ben Hutchings <[email protected]>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <[email protected]>.
(Sat, 29 Jan 2022 18:06:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Sean Christopherson <[email protected]>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <[email protected]>.
(Thu, 03 Mar 2022 18:39:02 GMT) (full text, mbox, link).
Subject: Re: Bug#1004504: Acknowledgement (Regression of -many on powerpc,
ppc64)
Date: Thu, 3 Mar 2022 18:36:14 +0000
On Sat, Jan 29, 2022, Ben Hutchings wrote:
> See also these reports on the linuxppc list:
>
> https://lore.kernel.org/linuxppc-dev/CANtoAtPcRGHafb7LddtrY5g43m82txS_mY3WO_ZtJ+pfuLvKaw@mail.gmail.com/#t
> https://lore.kernel.org/linuxppc-dev/[email protected]/
Cross-compiling PPC on x86-64 is also broken in 2.37 due to assembler errors.
I don't know enough about PPC to know if this is the same underlying root cause
or something different.
With 2.37-90 (amd64), attempting to compile various inline assembly (popcntd is
just one example), e.g.
echo 'int foo(int x) { int p; asm ("popcntd %0,%1" : "=r" (p) : "r" (x)); return p; }' | \
powerpc64-linux-gnu-gcc -x c - -c -o /dev/null
fails with:
/tmp/ccWfffoZ.s: Assembler messages:
/tmp/ccWfffoZ.s:26: Error: unrecognized opcode: `popcntd'
whereas version 2.34 compiles the above without error.
Acknowledgement sent
to Sean Christopherson <[email protected]>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <[email protected]>.
(Thu, 03 Mar 2022 18:42:02 GMT) (full text, mbox, link).
Subject: Re: Bug#1004504: Acknowledgement (Regression of -many on powerpc,
ppc64)
Date: Thu, 3 Mar 2022 18:38:54 +0000
On Thu, Mar 03, 2022, Sean Christopherson wrote:
> On Sat, Jan 29, 2022, Ben Hutchings wrote:
> > See also these reports on the linuxppc list:
> >
> > https://lore.kernel.org/linuxppc-dev/CANtoAtPcRGHafb7LddtrY5g43m82txS_mY3WO_ZtJ+pfuLvKaw@mail.gmail.com/#t
> > https://lore.kernel.org/linuxppc-dev/[email protected]/
>
> Cross-compiling PPC on x86-64 is also broken in 2.37 due to assembler errors.
> I don't know enough about PPC to know if this is the same underlying root cause
> or something different.
>
> With 2.37-90 (amd64), attempting to compile various inline assembly (popcntd is
> just one example), e.g.
>
> echo 'int foo(int x) { int p; asm ("popcntd %0,%1" : "=r" (p) : "r" (x)); return p; }' | \
> powerpc64-linux-gnu-gcc -x c - -c -o /dev/null
>
> fails with:
>
> /tmp/ccWfffoZ.s: Assembler messages:
> /tmp/ccWfffoZ.s:26: Error: unrecognized opcode: `popcntd'
>
> whereas version 2.34 compiles the above without error.
Ah, I belatedly see that Ben's bug report says "update from binutils 2.37 to this
snapshot", which suggests that earlier versions of 2.37 are healthy? Whereas the
cross-compiling issue goes back to at least 2.37.7.
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.