From Fedora Project Wiki

< Changes

Revision as of 22:04, 22 July 2019 by Tstellar (talk | contribs)


Change Proposal Name

Summary

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

Owner

Current status

  • Targeted release: Fedora 31
  • Last updated: 2019-07-22
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

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 system. With this proposal a user will be able to 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

A test for this change will be added to the lld package's CI tests. It will use update-alternatives 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.


User Experience

This will greatly enhances the experience for users wjo want to use lld. They will be able to try lld with their projects by simply running update-alternatives --set ld /usr/bin/ld.bfd 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