blob: 21a119ce5b60da86499bd0ebf0ca7851207f53c7 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#!/usr/bin/env bash
set -e
THIS_SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd )
SNAPSHOT_VERSION=2.24
echo ""
echo "Building binutils from snapshot version $SNAPSHOT_VERSION..."
echo ""
echo "Ensure you have the following packages installed:"
echo " build-essential texinfo flex bison"
echo ""
echo "Removing old output..."
rm -rf ./bin
rm -rf ./powerpc-none-elf
rm -rf ./share
SNAPSHOT_FILE=binutils-$SNAPSHOT_VERSION.tar.gz
if [ ! -f $SNAPSHOT_FILE ]; then
echo ""
echo "Grabbing binutils snapshot $SNAPSHOT_FILE..."
curl -nv http://mirrors.kernel.org/sourceware/binutils/releases/$SNAPSHOT_FILE > $SNAPSHOT_FILE
else
echo ""
echo "Reusing existing binutils snapshot file $SNAPSHOT_FILE..."
fi
echo ""
echo "Extracting binutils snapshot $SNAPSHOT_FILE..."
tar zxf $SNAPSHOT_FILE
cd binutils-$SNAPSHOT_VERSION/
echo ""
echo "Patching binutils with vmx128 support..."
patch -p0 < $THIS_SCRIPT_DIR/binutils-$SNAPSHOT_VERSION-vmx128.patch
echo ""
echo "Running ./configure..."
./configure \
--disable-debug \
--disable-dependency-tracking \
--disable-werror \
--enable-interwork \
--enable-multilib \
--target=powerpc-none-elf \
--with-gnu-ld \
--with-gnu-as \
--prefix=$THIS_SCRIPT_DIR
echo ""
echo "Running make..."
make
echo ""
echo "Running make install..."
make install
cd ..
echo ""
echo "Cleaning up binutils build temp"
#rm -rf ./binutils-$SNAPSHOT_VERSION
|