Bug 2055458 - systemd/package-notes should use -T instead of -dT
Summary: systemd/package-notes should use -T instead of -dT
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: package-notes
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact:
URL:
Whiteboard:
Depends On: 2099999
Blocks: 1956946
TreeView+ depends on / blocked
 
Reported: 2022-02-17 02:36 UTC by Fangrui Song
Modified: 2022-09-03 16:21 UTC (History)
12 users (show)

Fixed In Version: package-notes-0.5-4.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-03 16:21:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 28902 0 P2 UNCONFIRMED ld: `not found for insert` error has a weird ordering 2022-02-17 07:28:24 UTC

Description Fangrui Song 2022-02-17 02:36:01 UTC
Description of problem:
https://github.com/systemd/package-notes/blob/main/rpm/macros.package-notes-srpm#L52

`%_package_note_flags    %[%_package_note_status?"-Wl,%["%_package_note_linker" != "lld"?"-dT":"-T"],%{_package_note_file}":""]`

I was asked why lld doesn't support -dT. I think it is related to a GNU ld quirk about the `not found for insert` diagnostic.
Reported the issue for upstream GNU ld: https://sourceware.org/bugzilla/show_bug.cgi?id=28902#c1

If the ordering issue is fixed, GNU ld can use -T as well. The distro usage of -dT may break a project using -dT.

Comment 1 Luca Boccassi 2022-02-17 10:52:04 UTC
Using -dT is required as several hundreds if not more packages using autoconf cause the input flags to be duplicated, so -T by itself will not work. There is nothing wrong with ld.bfd, this is simply necessary for practical reasons due to the reality of what it means to put together a distribution made of tens of thousands of different packages with different configurations, build systems, glue scripts, etc. We hit this problem in both CBL-mariner and another internal Yocto-based distro. It's up to LLVM to be compatible with the default reference implementation (or not, and then simply accept not being used).

I recommend CLOSEWONTFIX for this ticket.

Comment 2 Zbigniew Jędrzejewski-Szmek 2022-03-17 20:45:51 UTC
Fangrui: I'll wait for the resolution of discussion in https://sourceware.org/bugzilla/show_bug.cgi?id=28902
before doing any changes here. Nick proposed either documenting existing behaviour or changing the code.

Comment 3 Zbigniew Jędrzejewski-Szmek 2022-08-09 09:30:07 UTC
This will become moot if #2099999 is accepted.

Comment 4 Ben Cotton 2022-08-09 13:41:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.


Note You need to log in before you can comment on or make changes to this bug.