mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-16 15:28:55 +00:00
fix toolchain build with linker plugins
older binutils dont automatically pick up plugins, but need to manually use wrappers like gcc-ar. This fix allows to compile the host toolchain with -ftlo on debian stretch. Signed-off-by: Norbert Lange <nolange79@gmail.com>
This commit is contained in:
parent
334f6d6479
commit
c91133acc1
@ -437,7 +437,7 @@ if [ -z "${CT_RESTART}" ]; then
|
||||
t="${!r}-"
|
||||
fi
|
||||
|
||||
for tool in ar as dlltool gcc g++ gcj gnatbind gdc gnatmake ld libtool nm objcopy objdump ranlib strip windres; do
|
||||
for tool in ar as dlltool gcc gcc-ar gcc-nm gcc-ranlib g++ gcj gnatbind gdc gnatmake ld libtool nm objcopy objdump ranlib strip windres; do
|
||||
# First try with prefix + suffix
|
||||
# Then try with prefix only
|
||||
# Then try with suffix only, but only for BUILD, and HOST iff REAL_BUILD == REAL_HOST
|
||||
@ -490,6 +490,16 @@ if [ -z "${CT_RESTART}" ]; then
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
# Incase the toolchain is built using plugins (-flto),
|
||||
# the gcc wrappers are needed for older binutils
|
||||
for tool in ar nm ranlib; do
|
||||
if [ -x "${CT_BUILDTOOLS_PREFIX_DIR}/bin/${!v}-gcc-${tool}" ]; then
|
||||
CT_DoLog DEBUG " '${!v}-${tool}' -> '${!v}-gcc-${tool}'"
|
||||
# this already is a script, so just copy over
|
||||
CT_DoExecLog ALL cp "${CT_BUILDTOOLS_PREFIX_DIR}/bin/${!v}-gcc-${tool}" "${CT_BUILDTOOLS_PREFIX_DIR}/bin/${!v}-${tool}"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Some makeinfo versions are a pain in [put your most sensible body part here].
|
||||
|
Loading…
x
Reference in New Issue
Block a user