Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 873934

Summary: sys-devel/binutils-2.39[pgo] doesn't build with llvm-ar
Product: Gentoo Linux Reporter: Mazunki Hoksaas <rolferen>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
emerge --info binutils
Requested config.log

Description Mazunki Hoksaas 2022-10-01 23:08:42 UTC
Created attachment 815098 [details]
build.log

Building binutils on a clang profile, which uses `llvm-ar` as the archiver, fails during the initial tests.

It builds fine with gcc, or if pgo USE flag is disabled. 

```
checking for -plugin option... checking for x86_64-pc-linux-gnu-ar... (cached) llvm-ar
no
configure: error: AR with --plugin and rc is required for LTO build
```

Full build log provided in file.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-01 23:11:11 UTC
Please include:
1. emerge --info
2. /var/tmp/portage/sys-devel/binutils-2.39-r2/work/build/config.log
Comment 2 Mazunki Hoksaas 2022-10-01 23:11:48 UTC
Created attachment 815101 [details]
emerge --info binutils
Comment 3 Mazunki Hoksaas 2022-10-01 23:13:04 UTC
Created attachment 815104 [details]
Requested config.log
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-01 23:13:29 UTC
(In reply to Mazunki Hoksaas from comment #2)
> Created attachment 815101 [details]
> emerge --info binutils

Using -stdlib=libstdc++ on Clang profiles is not considered supported. It'd be far better to start with a "normal" stage3 & profile, then set CC etc, because those profiles assume libcxx in various places.

And the stages will be ABI incompatible anyway.

Also, the symlink is dead: !/var/db/repos/gentoo/profiles/default/linux/amd64/17.1/clang.