llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* stable-rc: 5.10: riscv: defconfig: clang-nightly: build failed - Invalid or unknown z ISA extension: 'zifencei'
@ 2023-02-21  9:00 Naresh Kamboju
  2023-02-21  9:15 ` Conor Dooley
  0 siblings, 1 reply; 4+ messages in thread
From: Naresh Kamboju @ 2023-02-21  9:00 UTC (permalink / raw)
  To: llvm, linux-riscv, linux-stable, lkft-triage
  Cc: Nathan Chancellor, Greg Kroah-Hartman, Sasha Levin, conor,
	Heiko Stuebner

The riscv defconfig and tinyconfig builds failed with clang-nightly
due to below build warnings / errors on latest stable-rc 5.10.

Regression on riscv:
  - build/clang-nightly-tinyconfig - FAILED
  - build/clang-nightly-defconfig - FAILED

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

metadata:
-----
  git_repo: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
  git_sha: 7d11e4c4fc56eb25c5b41da93748dbcf21956316
  git_short_log: 7d11e4c4fc56 ("Linux 5.10.169-rc1")
  git_describe: v5.10.168-58-g7d11e4c4fc56

Build log:
----
make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=riscv
CROSS_COMPILE=riscv64-linux-gnu- HOSTCC=clang CC=clang LLVM=1
LLVM_IAS=1 LD=riscv64-linux-gnu-ld
riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
Invalid or unknown z ISA extension: 'zifencei'
riscv64-linux-gnu-ld: failed to merge target specific data of file
init/version.o
riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
Invalid or unknown z ISA extension: 'zifencei'
riscv64-linux-gnu-ld: failed to merge target specific data of file
init/do_mounts.o
riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
Invalid or unknown z ISA extension: 'zifencei'
riscv64-linux-gnu-ld: failed to merge target specific data of file
init/noinitramfs.o
riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
Invalid or unknown z ISA extension: 'zifencei'
riscv64-linux-gnu-ld: failed to merge target specific data of file
init/calibrate.o
riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
Invalid or unknown z ISA extension: 'zifencei'

Build details,
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.168-58-g7d11e4c4fc56/testrun/14869376/suite/build/test/clang-nightly-tinyconfig/details/

Build history,
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.168-58-ga96fb51aec5a/testrun/14866489/suite/build/test/clang-nightly-defconfig/details/

https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.168-58-g7d11e4c4fc56/testrun/14869376/suite/build/test/clang-nightly-tinyconfig/history/

steps to reproduce:
-----------
# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#
# See https://docs.tuxmake.org/ for complete documentation.
# Original tuxmake command with fragments listed below.
# tuxmake --runtime podman --target-arch riscv --toolchain
clang-nightly --kconfig tinyconfig LLVM=1 LLVM_IAS=1
LD=riscv64-linux-gnu-ld

--
Linaro LKFT
https://lkft.linaro.org

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

* Re: stable-rc: 5.10: riscv: defconfig: clang-nightly: build failed - Invalid or unknown z ISA extension: 'zifencei'
  2023-02-21  9:00 stable-rc: 5.10: riscv: defconfig: clang-nightly: build failed - Invalid or unknown z ISA extension: 'zifencei' Naresh Kamboju
@ 2023-02-21  9:15 ` Conor Dooley
  2023-02-21 22:33   ` Nathan Chancellor
  0 siblings, 1 reply; 4+ messages in thread
From: Conor Dooley @ 2023-02-21  9:15 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: llvm, linux-riscv, linux-stable, lkft-triage, Nathan Chancellor,
	Greg Kroah-Hartman, Sasha Levin, conor, Heiko Stuebner

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

On Tue, Feb 21, 2023 at 02:30:17PM +0530, Naresh Kamboju wrote:
> The riscv defconfig and tinyconfig builds failed with clang-nightly
> due to below build warnings / errors on latest stable-rc 5.10.
> 
> Regression on riscv:
>   - build/clang-nightly-tinyconfig - FAILED
>   - build/clang-nightly-defconfig - FAILED

> Build log:
> ----
> make --silent --keep-going --jobs=8
> O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=riscv
> CROSS_COMPILE=riscv64-linux-gnu- HOSTCC=clang CC=clang LLVM=1
> LLVM_IAS=1 LD=riscv64-linux-gnu-ld
> riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> Invalid or unknown z ISA extension: 'zifencei'
> riscv64-linux-gnu-ld: failed to merge target specific data of file
> init/version.o
> riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> Invalid or unknown z ISA extension: 'zifencei'
> riscv64-linux-gnu-ld: failed to merge target specific data of file
> init/do_mounts.o
> riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> Invalid or unknown z ISA extension: 'zifencei'
> riscv64-linux-gnu-ld: failed to merge target specific data of file
> init/noinitramfs.o
> riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> Invalid or unknown z ISA extension: 'zifencei'
> riscv64-linux-gnu-ld: failed to merge target specific data of file
> init/calibrate.o
> riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> Invalid or unknown z ISA extension: 'zifencei'

> Build details,
> https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.168-58-g7d11e4c4fc56/testrun/14869376/suite/build/test/clang-nightly-tinyconfig/details/

binutils 2.35 by the looks of things, I **think** that zifencei didn't
land until 2.36. zicsr and zifence get added via cc-option-yn, which,
IIRC, doesn't do anything with the linker. I dunno if anyone in RISC-V
land cares this much about "odd" configurations back in 5.10, but while
a fix is outstanding, you could use a newer binutils?

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

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

* Re: stable-rc: 5.10: riscv: defconfig: clang-nightly: build failed - Invalid or unknown z ISA extension: 'zifencei'
  2023-02-21  9:15 ` Conor Dooley
@ 2023-02-21 22:33   ` Nathan Chancellor
  2023-02-21 23:17     ` Conor Dooley
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2023-02-21 22:33 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Naresh Kamboju, llvm, linux-riscv, linux-stable, lkft-triage,
	Greg Kroah-Hartman, Sasha Levin, conor, Heiko Stuebner

On Tue, Feb 21, 2023 at 09:15:11AM +0000, Conor Dooley wrote:
> On Tue, Feb 21, 2023 at 02:30:17PM +0530, Naresh Kamboju wrote:
> > The riscv defconfig and tinyconfig builds failed with clang-nightly
> > due to below build warnings / errors on latest stable-rc 5.10.
> > 
> > Regression on riscv:
> >   - build/clang-nightly-tinyconfig - FAILED
> >   - build/clang-nightly-defconfig - FAILED
> 
> > Build log:
> > ----
> > make --silent --keep-going --jobs=8
> > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=riscv
> > CROSS_COMPILE=riscv64-linux-gnu- HOSTCC=clang CC=clang LLVM=1
> > LLVM_IAS=1 LD=riscv64-linux-gnu-ld
> > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > Invalid or unknown z ISA extension: 'zifencei'
> > riscv64-linux-gnu-ld: failed to merge target specific data of file
> > init/version.o
> > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > Invalid or unknown z ISA extension: 'zifencei'
> > riscv64-linux-gnu-ld: failed to merge target specific data of file
> > init/do_mounts.o
> > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > Invalid or unknown z ISA extension: 'zifencei'
> > riscv64-linux-gnu-ld: failed to merge target specific data of file
> > init/noinitramfs.o
> > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > Invalid or unknown z ISA extension: 'zifencei'
> > riscv64-linux-gnu-ld: failed to merge target specific data of file
> > init/calibrate.o
> > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > Invalid or unknown z ISA extension: 'zifencei'
> 
> > Build details,
> > https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.168-58-g7d11e4c4fc56/testrun/14869376/suite/build/test/clang-nightly-tinyconfig/details/
> 
> binutils 2.35 by the looks of things, I **think** that zifencei didn't
> land until 2.36. zicsr and zifence get added via cc-option-yn, which,
> IIRC, doesn't do anything with the linker. I dunno if anyone in RISC-V
> land cares this much about "odd" configurations back in 5.10, but while
> a fix is outstanding, you could use a newer binutils?

This is new in clang-17 so I bisected LLVM down to commit 22e199e6afb1
("[RISCV] Accept zicsr and zifencei command line options"), so I think
we need something like commit aae538cd03bc ("riscv: fix detection of
toolchain Zihintpause support") for zifencei to make sure all three
tools stay in sync, since I suspect that this is reproducible in
mainline with GNU ld. We just happen not to notice when using
LLVM=1 LLVM_IAS=1 since the tools have symmetrical support.

I can work up something like that change tomorrow if that seems like the
path worth taking.

Cheers,
Nathan

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

* Re: stable-rc: 5.10: riscv: defconfig: clang-nightly: build failed - Invalid or unknown z ISA extension: 'zifencei'
  2023-02-21 22:33   ` Nathan Chancellor
@ 2023-02-21 23:17     ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2023-02-21 23:17 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Conor Dooley, Naresh Kamboju, llvm, linux-riscv, linux-stable,
	lkft-triage, Greg Kroah-Hartman, Sasha Levin, Heiko Stuebner

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

On Tue, Feb 21, 2023 at 03:33:31PM -0700, Nathan Chancellor wrote:
> On Tue, Feb 21, 2023 at 09:15:11AM +0000, Conor Dooley wrote:
> > On Tue, Feb 21, 2023 at 02:30:17PM +0530, Naresh Kamboju wrote:
> > > The riscv defconfig and tinyconfig builds failed with clang-nightly
> > > due to below build warnings / errors on latest stable-rc 5.10.
> > > 
> > > Regression on riscv:
> > >   - build/clang-nightly-tinyconfig - FAILED
> > >   - build/clang-nightly-defconfig - FAILED
> > 
> > > Build log:
> > > ----
> > > make --silent --keep-going --jobs=8
> > > O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=riscv
> > > CROSS_COMPILE=riscv64-linux-gnu- HOSTCC=clang CC=clang LLVM=1
> > > LLVM_IAS=1 LD=riscv64-linux-gnu-ld
> > > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > > Invalid or unknown z ISA extension: 'zifencei'
> > > riscv64-linux-gnu-ld: failed to merge target specific data of file
> > > init/version.o
> > > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > > Invalid or unknown z ISA extension: 'zifencei'
> > > riscv64-linux-gnu-ld: failed to merge target specific data of file
> > > init/do_mounts.o
> > > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > > Invalid or unknown z ISA extension: 'zifencei'
> > > riscv64-linux-gnu-ld: failed to merge target specific data of file
> > > init/noinitramfs.o
> > > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > > Invalid or unknown z ISA extension: 'zifencei'
> > > riscv64-linux-gnu-ld: failed to merge target specific data of file
> > > init/calibrate.o
> > > riscv64-linux-gnu-ld: -march=rv64i2p0_m2p0_a2p0_zicsr2p0_zifencei2p0:
> > > Invalid or unknown z ISA extension: 'zifencei'
> > 
> > > Build details,
> > > https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.10.y/build/v5.10.168-58-g7d11e4c4fc56/testrun/14869376/suite/build/test/clang-nightly-tinyconfig/details/
> > 
> > binutils 2.35 by the looks of things, I **think** that zifencei didn't
> > land until 2.36. zicsr and zifence get added via cc-option-yn, which,
> > IIRC, doesn't do anything with the linker. I dunno if anyone in RISC-V
> > land cares this much about "odd" configurations back in 5.10, but while
> > a fix is outstanding, you could use a newer binutils?
> 
> This is new in clang-17 so I bisected LLVM down to commit 22e199e6afb1
> ("[RISCV] Accept zicsr and zifencei command line options"), so I think
> we need something like commit aae538cd03bc ("riscv: fix detection of
> toolchain Zihintpause support") for zifencei to make sure all three
> tools stay in sync, since I suspect that this is reproducible in
> mainline with GNU ld. We just happen not to notice when using
> LLVM=1 LLVM_IAS=1 since the tools have symmetrical support.

At least if it is in mainline there'll be interest in fixing it!
Nobody was shipping hardware worth mention when 5.10 was en vogue, so
little interest in it :(

> I can work up something like that change tomorrow if that seems like the
> path worth taking.

I'm not sure if this one is the same as Zihintpause though, because
zifencei & zicsr were part of i prior to a spec update, so we may need
to be careful about the spec version that clang/llvm is using if we
decide not to pass zifencei/zicsr to it. See arch/riscv/Makefile, about
L55 for a comment...
I'll go get myself a clang-17 tomorrow and give things a whirl if you
want Nathan?

Cheers,
Conor.

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

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

end of thread, other threads:[~2023-02-21 23:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-21  9:00 stable-rc: 5.10: riscv: defconfig: clang-nightly: build failed - Invalid or unknown z ISA extension: 'zifencei' Naresh Kamboju
2023-02-21  9:15 ` Conor Dooley
2023-02-21 22:33   ` Nathan Chancellor
2023-02-21 23:17     ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).