mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-28 16:17:51 +01:00
Reviewed-on: #2 Co-authored-by: Stepan Usatiuk <stepan@usatiuk.com> Co-committed-by: Stepan Usatiuk <stepan@usatiuk.com>
36 lines
684 B
Bash
Executable File
36 lines
684 B
Bash
Executable File
#!/bin/bash
|
|
set -euxo pipefail
|
|
|
|
if [ -z "$FICUS_ROOT" ]; then
|
|
echo "$FICUS_ROOT" is blank
|
|
fi
|
|
|
|
mkdir -p $FICUS_ROOT/toolchain || exit 1
|
|
|
|
pushd $FICUS_ROOT/toolchain
|
|
|
|
mkdir -p binutils-i686-elf
|
|
|
|
pushd binutils-i686-elf
|
|
|
|
if [ ! -d "binutils-2.41" ]; then
|
|
wget https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz
|
|
tar xf binutils-2.41.tar.xz
|
|
rm binutils-2.41.tar.xz
|
|
fi
|
|
|
|
mkdir -p build
|
|
|
|
pushd build
|
|
|
|
export PREFIX="$FICUS_ROOT/toolchain/gcc-i686-elf-prefix/"
|
|
export TARGET=i686-elf
|
|
export PATH="$PREFIX/bin:$PATH"
|
|
|
|
../binutils-2.41/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror
|
|
|
|
make -j$(nproc)
|
|
make install
|
|
|
|
touch -m ../done
|