DevHeads.net

Fedora 31 Self-Contained Change proposal: Add LLD As Update Alternatives Option For LD

<a href="https://fedoraproject.org/wiki/Changes/Add_LLD_As_Update_Alternatives_Option_For_LD" title="https://fedoraproject.org/wiki/Changes/Add_LLD_As_Update_Alternatives_Option_For_LD">https://fedoraproject.org/wiki/Changes/Add_LLD_As_Update_Alternatives_Op...</a>

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

== Owner ==
* Name: [[User:tstellar| Tom Stellard]]
* Email: < ... at redhat dot com>

== 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)
* Release engineering:
* Policies and guidelines: N/A
* 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)
* Blocks product? N/A

Comments

Re: Fedora 31 Self-Contained Change proposal: Add LLD As Update

By King InuYasha at 07/23/2019 - 10:30

On Tue, Jul 23, 2019 at 10:28 AM Stephen John Smoogen < ... at gmail dot com> wrote:
Isn't it already this way?

Re: Fedora 31 Self-Contained Change proposal: Add LLD As Update

By Stephen John Smoogen at 07/23/2019 - 12:00

You know what helps.. looking at the right system before making an email
about this being a system wide change. You are correct Neal:

[smooge@fedora00 ~]$ ls -l /usr/bin/ld
lrwxrwxrwx. 1 root root 20 Jul 19 18:51 /usr/bin/ld -> /etc/alternatives/ld

{ I was on a CentOS-6 box when I checked and thought I was on my F30 box }