2021-01-02 00:13:11 +01:00
|
|
|
TAG="<sh-elf-gcc>"
|
|
|
|
|
|
|
|
run_quietly() {
|
|
|
|
out="$1"
|
|
|
|
shift 1
|
|
|
|
"$@" >$out 2>&1
|
|
|
|
if [[ "$?" != 0 ]]; then
|
|
|
|
echo "$tag error: build failed, please check $(pwd)/$out o(x_x)o"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
2021-01-02 22:48:31 +01:00
|
|
|
|
|
|
|
# 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
|