FS#76017 - [clang] Sysroot and triplet misdetection fix

Attached to Project: Arch Linux
Opened by Adrian (adirat) - Monday, 26 September 2022, 10:19 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:17 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Hi, while building the Linux kernel tools on ArchLinux with Clang, I've noticed there are Clang bugs when detecting the sysroot and parsing the triplet. I've created review on the LLVM phabricator to fix these bugs and would like to have the patch added to the PKGBUILD once it gets accepted upstream so I can cleanup the kernel build tree as well. Any feedback from the ArchLinux clang maintainers is welcome, thanks!

https://reviews.llvm.org/D134454

Additional info:
* Affects 14.0.6 and later

Steps to reproduce:
Run `make ARCH=arm64 CC=clang CROSS_COMPILE=aarch64-linux-gnu- bpf`
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:17 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/clang/issues/2
Comment by Adrian (adirat) - Thursday, 06 October 2022, 08:43 GMT
According to the LLVM maintainers [1] the sysroot auto-detection code in Clang is wrong by design and should not be used (it will be removed in the future).

Instead, each distribution will need to add a configuration file via a mechanism which has landed in LLVM mainline to specify distro-specific configurations like sysroot locations [2].

Once ArchLinux llvm/clang is updated to include commit [2]. Can you please add a config file to specify sysroots like the `/usr/aarch64-linux-gnu` location? Thank you!

[1] https://reviews.llvm.org/D134454
[2] https://reviews.llvm.org/rG063e17d8b04b41cd8bd174aebb6603eb1a76d34a
Comment by Adrian (adirat) - Thursday, 06 October 2022, 11:18 GMT

Loading...