From Fedora Project Wiki

Revision as of 02:53, 12 August 2019 by Bcotton (talk | contribs) (Fix title, add trackers)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Add LDD as update alternatives option for LD

Summary

Allow users to optionally use update-alternatives to make /usr/bin/ld point to /usr/bin/lld.

Owner

Current status

Detailed Description

Update the lld package %post and %postun steps to configure the system so that a user can use the update-alternatives tool to create a symlink from /usr/bin/ld to /usr/bin/lld. This will effectively allow lld to act as the system linker and make it easier for users to integrate lld into their projects. This same functionality is currently available with one other non-system linker: gold.

I want to be clear that this proposal is not about making lld the system linker or using lld during brew builds. This is simply about making it easier for end-users to use lld with their own projects.

Benefit to Fedora

This change will make it much easier for users to try out lld in their projects. Many build systems and compilers assume that the linker is /usr/bin/ld, and it is very difficult to seamlessly integrate lld into existing build systems. With this proposal a user will be able to easily switch between ld.bfd and lld without having to make any modifications to their build systems.

Scope

  • Proposal owners: tstellar
  • Other developers: N/A (not a System Wide Change)
  • Policies and guidelines: N/A (not a System Wide Change)
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

N/A (not a System Wide Change)

How To Test

Tests for this change will be added to the lld package's CI tests. One test will install lld and verify that /usr/bin/ld.bfd is still the system linker. Another test will use update-alternatives to update /usr/bin/ld to point to /usr/bin/lld and then it will run /usr/bin/ld --version to verify that this correctly points to lld and then link a simple program with it.

User Experience

This will greatly enhance the experience for users who want to use lld. They will be able to try lld with their projects by simply running update-alternatives --set ld /usr/bin/lld instead of having to make modifications to existing build systems.

Dependencies

N/A (not a System Wide Change)

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No
  • Blocks product? N/A

Documentation

N/A (not a System Wide Change)

Release Notes