Created
July 21, 2017 00:31
-
-
Save grooverdan/369725e942ffc6569da074e98bf2c901 to your computer and use it in GitHub Desktop.
build gcc and binutils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -xeuo pipefail | |
T=$(mktemp -d /tmp/XXXXX) | |
configure_gcc() | |
{ | |
../configure --prefix=/toolchain --disable-multilib --enable-languages=c,c++ | |
} | |
configure_binutils() | |
{ | |
../configure --prefix=/toolchain --disable-multilib | |
} | |
for TOOL in gcc binutils | |
do | |
cd "${WORKSPACE}/${TOOL}" | |
mkdir build | |
cd build | |
configure_${TOOL} | |
make -j $(nproc) --output-sync=target | |
make -j $(nproc) DESTDIR="${T}" install | |
done | |
specifier="${HOST_PLATFORM}-gcc-${GCC_REVISION:0:14}--binutils-${BINUTILS_REVISION:0:14}" | |
tar jcf "${WORKSPACE}/native-${specifier}.tbz" -C "${T}" toolchain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment