-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path1-binutils.sh
executable file
·62 lines (50 loc) · 1.19 KB
/
1-binutils.sh
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
#!/bin/bash
export STAGE=1
. ./environment.sh
. ./package-versions.sh
export FORCE_UNSAFE_CONFIGURE=1
if [ -f $PROGRESS_DIR/1-binutils-$PASS ] ; then
exit 0
fi
echo "building binutils pass $PASS..."
set -e
cd $MINL/sources
rm -rf binutils-${binutils_v}
tar xf binutils-${binutils_v}.tar.xz
cd binutils-${binutils_v}
if [ "$PASS" == "2" ] ; then
sed '6009s/$add_dir//' -i ltmain.sh
fi
mkdir build
cd build
if [ "$PASS" == "1" ] ; then
../configure \
--prefix=$MINL/tools \
--with-sysroot=$MINL \
--target=$MINL_TGT \
--disable-nls \
--disable-werror \
--enable-gprofng=no \
--enable-default-hash-style=gnu
else
../configure \
--prefix=/usr \
--build=$(../config.guess) \
--host=$MINL_TGT \
--disable-nls \
--enable-shared \
--enable-gprofng=no \
--disable-werror \
--enable-64-bit-bfd \
--enable-default-hash-style=gnu
fi
make
if [ "$PASS" == "1" ] ; then
make install
else
make DESTDIR=$MINL install
rm $MINL/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes,sframe}.{a,la}
fi
cd $MINL/sources
rm -rf binutils-${binutils_v}
touch $PROGRESS_DIR/1-binutils-$PASS