Bug 2043368

Summary: lld doesn't support the -dT flag
Product: [Fedora] Fedora Reporter: Tom Stellard <tstellar>
Component: package-notesAssignee: Zbigniew Jędrzejewski-Szmek <zbyszek>
Status: CLOSED RAWHIDE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gwync, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: package-notes-0.4-11.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-22 12:39:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom Stellard 2022-01-21 06:14:52 UTC
Description of problem:
lld does not support the -dT flag, so packages that link with lld fail to build when the package-notes-srpm-macros package is installed.  Replacing -dT with --script works fine.

Version-Release number of selected component (if applicable):
package-notes-srpm-macros-0.4-4.fc36

How reproducible:
Always

Steps to Reproduce:
1. Add -fuse-ld=lld to the linker flags for any package and build it in a buildroot with package-notes-srpm-macros installed.


Actual results:
Build fails with the error:

ld.lld: error: unknown argument '-dT'

Expected results:
Build succeeds.

Comment 1 Zbigniew Jędrzejewski-Szmek 2022-01-22 12:39:08 UTC
With package-notes-0.4-11.fc36 it is possible to define

%global _package_note_linker lld

and the generated script will use -T instead of -dT.
(It'd be nice to make this automatic, but I don't think it's possible. We generate the script early,
and there doesn't seem to be any way to figure out which linker will be used.)