toolchain-funcs.eclass: cleanup obsolete bits in tc-ld-force-bfd

I didn't want to drop this entirely in c26413ae80
as I wanted to keep it to just fixing the error I'd made, but I don't see the
point in keeping this now anyway - non-gcc/clang isn't a thing and if it is
I'd hope they'd support -fuse-ld=bfd anyway.

Plus it's an obvious approach if we need it for something else like forcing
an alt linker that isn't bfd anyway, no need for having cruft remaining.

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2023-07-30 19:40:12 +01:00
parent af86694a98
commit d719ea13be

View File

@@ -545,25 +545,6 @@ tc-ld-force-bfd() {
if tc-is-gcc || tc-is-clang ; then
export LDFLAGS="${LDFLAGS} -fuse-ld=bfd"
fi
if false ; then
# TODO: Clean this up, or is it useful for when the compiler can't
# be detected or for rubbish shims? Might be helpful for cases like
# when porting to new linker which GCC doesn't yet recognise (less
# of a problem for Clang as it accepts absolute paths), like was
# the case for mold.
#
# <=gcc-4.7 and <=clang-3.4 require some coercion.
# Only works if bfd exists.
if [[ -e ${path_ld} ]] ; then
local d="${T}/bfd-linker"
mkdir -p "${d}"
ln -sf "${path_ld}" "${d}"/ld
export LDFLAGS="${LDFLAGS} -B${d}"
else
die "unable to locate a BFD linker"
fi
fi
}
# @FUNCTION: _tc-has-openmp