explicitly link previously-built binutils to GCC

This commit is contained in:
Lephenixnoir 2021-01-02 22:48:31 +01:00
parent 2e85c7fbc4
commit 0400e3c470
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 21 additions and 0 deletions

View File

@ -36,6 +36,15 @@ mkdir build
# directory and later symlink executables to $PREFIX/bin.
PREFIX="$(pwd)"
# Symlink as, ld, ar and ranlib, which gcc will not find by itself (we renamed
# them from sh3eb-elf-* to sh-elf-* with --program-prefix).
mkdir -p sh3eb-elf/bin
ln -s $(command -v sh-elf-as) sh3eb-elf/bin/as
ln -s $(command -v sh-elf-ld) sh3eb-elf/bin/ld
ln -s $(command -v sh-elf-ar) sh3eb-elf/bin/ar
ln -s $(command -v sh-elf-ranlib) sh3eb-elf/bin/ranlib
cd build
echo "$TAG Configuring gcc..."

12
util.sh
View File

@ -9,3 +9,15 @@ run_quietly() {
exit 1
fi
}
# Names of binutils tools, otherwise GCC assumes sh3eb-elf-*
export AR_FOR_TARGET=sh-elf-ar
export AS_FOR_TARGET=sh-elf-as
export DLLTOOL_FOR_TARGET=sh-elf-dlltool
export LD_FOR_TARGET=sh-elf-ld
export NM_FOR_TARGET=sh-elf-nm
export OBJCOPY_FOR_TARGET=sh-elf-objcopy
export OBJDUMP_FOR_TARGET=sh-elf-objdump
export RANLIB_FOR_TARGET=sh-elf-ranlib
export READELF_FOR_TARGET=sh-elf-readelf
export STRIP_FOR_TARGET=sh-elf-strip