-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy path001-binutils-PPU.sh
More file actions
executable file
·51 lines (37 loc) · 1.39 KB
/
001-binutils-PPU.sh
File metadata and controls
executable file
·51 lines (37 loc) · 1.39 KB
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
#!/bin/sh -e
# binutils-PPU.sh by Naomi Peori (naomi@peori.ca)
BINUTILS="binutils-2.22"
if [ ! -d ${BINUTILS} ]; then
## Download the source code.
if [ ! -f ${BINUTILS}.tar.bz2 ]; then wget --continue https://ftpmirror.gnu.org/binutils/${BINUTILS}.tar.bz2; fi
## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue https://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue https://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
## Unpack the source code.
tar xfvj ${BINUTILS}.tar.bz2
## Patch the source code.
cat ../patches/${BINUTILS}-PS3.patch | patch -p1 -d ${BINUTILS}
## Replace config.guess and config.sub
cp config.guess config.sub ${BINUTILS}
fi
if [ ! -d ${BINUTILS}/build-ppu ]; then
## Create the build directory.
mkdir ${BINUTILS}/build-ppu
fi
## Enter the build directory.
cd ${BINUTILS}/build-ppu
## Configure the build.
../configure --prefix="$PS3DEV/ppu" --target="powerpc64-ps3-elf" \
--disable-nls \
--disable-shared \
--disable-debug \
--disable-dependency-tracking \
--disable-werror \
--enable-64-bit-bfd \
--with-gcc \
--with-gnu-as \
--with-gnu-ld
## Compile and install.
PROCS="$(nproc --all 2>&1)" || ret=$?
if [ ! -z $ret ]; then PROCS=4; fi
${MAKE:-make} -j $PROCS && ${MAKE:-make} libdir=host-libs/lib install