summaryrefslogtreecommitdiff
path: root/contrib/dep_builders/gcc
blob: defd4d588d62198e66cdd3ea1c599482b18da603 (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
28
29
30
31
32
#!/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/gcc-build/"
SYSROOT="$(pwd)/out/sysrootu/"
mkdir -p $PREFIX
mkdir -p $BUILDDIR
make out/sysrootu/usr/include/

cd $BUILDDIR

../gcc/configure \
	--target=x86_64-camellia \
	--prefix="$PREFIX" \
	--with-sysroot="$SYSROOT" \
	--enable-languages=c,c++ \
	--enable-default-pie \
	--disable-nls \
	--disable-gcov \
	--disable-werror
make all-gcc
make all-target-libgcc
make install-gcc
make install-target-libgcc