clang-17 does not enable target-feature zi…” : Bugs : llvm-toolchain-17 package : Ubuntu

On riscv64 Ubuntu Mantic ‘gcc-13 -dumpspecs’ returns

march=rv64imafdc_zicsr_zifencei mabi=lp64d

‘clang-17 -v foo.c’ shows

-target-feature -zifencei

We should enable -target-feature +zifencei as default to match gcc.

The FENCE.I instruction is used to clear the instruction cache.

ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: clang-17 1:17.0.2-1~exp1ubuntu2.1
ProcVersionSignature: Ubuntu 6.5.0-9.9.1-generic 6.5.3
Uname: Linux 6.5.0-9-generic riscv64
ApportVersion: 2.27.0-0ubuntu5
Architecture: riscv64
CasperMD5json:
 {
   “result”: “skip”
 }
CloudArchitecture: riscv64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Mon Oct 23 11:13:34 2023
InstallationDate: Installed on 2023-10-19 (4 days ago)
InstallationMedia: Ubuntu-Server 23.10 “Mantic Minotaur” – Release riscv64 (20231011)
SourcePackage: llvm-toolchain-17
UpgradeStatus: No upgrade log present (probably fresh install)

Read more here: Source link