summaryrefslogtreecommitdiff
path: root/tools/dep_builders/binutils
blob: 42dd04b9d0a5720ce89ce7c6e2fa1c8c42c8320c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
set -eu

# ensure that we're in the repo root
if [ ! -d .git ]; then
	echo please cd to the repo\'s main directory
	exit
fi

export PREFIX="$(pwd)/toolchain/prefix/"
export PATH="$(pwd)/toolchain/prefix/bin/:$PATH"
BUILDDIR="$(pwd)/toolchain/binutils-build/"
SYSROOT="$(pwd)/sysroot/"
mkdir -p $PREFIX
mkdir -p $BUILDDIR

cd $BUILDDIR

../binutils/configure \
	--target=x86_64-camellia \
	--prefix="$PREFIX" \
	--with-sysroot="$SYSROOT" \
	--disable-nls \
	--disable-werror
mkdir -p gas/doc/ # stupid workaround for the broken build
make -j4
make install