Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 594036 - toolchain-binutils.eclass: Potentially orphaned code
Summary: toolchain-binutils.eclass: Potentially orphaned code
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-17 05:56 UTC by tiage
Modified: 2016-11-11 22:42 UTC (History)
1 user (show)

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 tiage 2016-09-17 05:56:29 UTC
In toolchain-binutils.eclass line 243 (handling of the gold linker)

    # enable gold if available (installed as ld.gold)
    if use cxx ; then
        if grep -q 'enable-gold=default' "${S}"/configure ; then
            myconf+=( --enable-gold )
        # old ways - remove when 2.21 is stable
        elif grep -q 'enable-gold=both/ld' "${S}"/configure ; then
            myconf+=( --enable-gold=both/ld )
        elif grep -q 'enable-gold=both/bfd' "${S}"/configure ; then
            myconf+=( --enable-gold=both/bfd )
        fi
        if grep -q -e '--enable-plugins' "${S}"/ld/configure ; then
            myconf+=( --enable-plugins )
        fi
    fi    

The commend 'old ways ...' suggest that it follows legacy code for binutils prior to binutils-2.21. As the current minimum version of binutils in portage is 2.21.1-r1, someone with better knowledge than me should judge if these old ways are still needed or if they can be removed.
Comment 1 Adam Feldman gentoo-dev 2016-09-20 23:56:12 UTC
Not sure if it is orphaned.  This clause might be applicable to binutils-hppa64 which maintains versions 2.19 and 2.20
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2016-09-21 12:55:39 UTC
HPPA doesn't build a gold linker at all, regardless of whether the configure script says it can. That means --enable-gold is set anyway and then later disregarded by the build system. I guess the eclass code is still valid for anyone using binutils <2.21.
Comment 3 SpanKY gentoo-dev 2016-11-11 22:42:30 UTC
(In reply to tiage from comment #0)

toolchain-binutils is used for versions back to 2.14.  grab the toolchain overlay if you want those versions.

(In reply to Jeroen Roovers from comment #2)

a bunch of arch ports don't support gold (like hppa).  the binutils system silently ignores things if it isn't supported for the target in question which is fine ... throwing an error isn't terribly useful.