Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937596 - media-libs/dav1d-9999 won't compile with "-fuse-ld=gold" as the gold linker does not support "-z,pack-relative-relocs"
Summary: media-libs/dav1d-9999 won't compile with "-fuse-ld=gold" as the gold linker d...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-08 22:38 UTC by marius.spix
Modified: 2024-08-08 23:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Meson Log (meson-log.txt,3.67 KB, text/plain)
2024-08-08 22:38 UTC, marius.spix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marius.spix 2024-08-08 22:38:36 UTC
Created attachment 899645 [details]
Meson Log

Profile: default/linux/amd64/23.0/split-usr/no-multilib

When -fuse-ld=gold is set in the CFLAGS, media-libs/dav1d-9999 won't compile.

The Gold linker does not support the option "-z,pack-relative-relocs" 

Something in the build process is adding the options "-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" to the CFLAGS.

My original CFLAGS in make.conf were 
CFLAGS="-march=haswell -mtune=haswell -mno-rtm -mno-hle -O3 -pipe -ftracer -fuse-ld=gold"

Workaround: remove the option "-fuse-ld=gold" from the CFLAGS 

Please find the attached meson log.
Comment 1 Paul Zander 2024-08-08 22:42:41 UTC
https://gitweb.gentoo.org/repo/gentoo.git/tree/profiles/base/package.use.mask#n467

> # Andreas K. Hüttel <dilfridge@gentoo.org> (2021-10-09)
> # ld.gold is essentially abandoned; using it as default may have
> # unintended consequences. Disabling this feature in future ebuilds.
> >sys-devel/binutils-2.37_p1 default-gold
> >sys-devel/binutils-hppa64-2.37_p1 default-gold

This might be a pretty good hint that using "-fuse-ld=gold" is good idea.
Comment 2 marius.spix 2024-08-08 23:07:49 UTC
Hi Paul,

thank you, I exchanged "-fuse-ld=gold" with "-fuse-ld=lld" and it works fine.

I remember, gold had been recommended when I set up this system for the first time, however, it seems that gold is only barely maintained.