Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 500148 - sys-firmware/ipxe should check if linker is gold instead of blindly appending .bfd
Summary: sys-firmware/ipxe should check if linker is gold instead of blindly appending...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-03 02:14 UTC by Alex Xu (Hello71)
Modified: 2015-03-16 21:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Xu (Hello71) 2014-02-03 02:14:47 UTC
emake Q='' \
            LD="$(tc-getLD).bfd" \

This is likely a bad idea.

What happens if I have "LD=ld.bfd"? What happens if my toolchain does not have "ld.bfd"? (not sure if this can actually happen)
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2014-02-06 19:04:08 UTC
(In reply to Alex Xu (Hello71) from comment #0)
> emake Q='' \
>             LD="$(tc-getLD).bfd" \
> 
> This is likely a bad idea.

The bad idea is blindly erroring when its a case we can simply handle in software and not break a user's build.

> 
> What happens if I have "LD=ld.bfd"? What happens if my toolchain does not
> have "ld.bfd"? (not sure if this can actually happen)

I encourage you to look at binutils.eselect and tc-getLD in toolchain.eclass. If you don't have ld.bfd then you aren't on a Gentoo machine and ebuilds won't work.

I hope you didn't file other bugs like this to other maintainers because this method is vastly superior than detecting gold and failing like other ebuilds have in the past.
Comment 2 Alex Xu (Hello71) 2014-02-07 01:13:44 UTC
(In reply to Doug Goldstein from comment #1)
> (In reply to Alex Xu (Hello71) from comment #0)
> > emake Q='' \
> >             LD="$(tc-getLD).bfd" \
> > 
> > This is likely a bad idea.
> 
> The bad idea is blindly erroring when its a case we can simply handle in
> software and not break a user's build.
> 
> > 
> > What happens if I have "LD=ld.bfd"? What happens if my toolchain does not
> > have "ld.bfd"? (not sure if this can actually happen)
> 
> I encourage you to look at binutils.eselect and tc-getLD in
> toolchain.eclass. If you don't have ld.bfd then you aren't on a Gentoo
> machine and ebuilds won't work.
> 
> I hope you didn't file other bugs like this to other maintainers because
> this method is vastly superior than detecting gold and failing like other
> ebuilds have in the past.

1. I find that to be a quite offensive tone.

2. binutils.eselect has no reference to either bfd nor gold, and in fact, the only reference to ld is in ldscripts. I'll assume for your benefit that you meant binutils-config, and even *that* has no such reference to gold, only bfd.

2.1. toolchain*-funcs*.eclass has only one reference to bfd/gold in the context of ldscripts.

This change breaks an existing workflow:

Step 1: Set LD=ld.bfd in package.env.
Step 2: Build ipxe.

My suggested solution:

emake LD="${myld%.*}.bfd"