-
-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathbuild-binutils.sh
More file actions
35 lines (30 loc) · 1.04 KB
/
build-binutils.sh
File metadata and controls
35 lines (30 loc) · 1.04 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
#!/bin/sh
#---------------------------------------------------------------------------------
#---------------------------------------------------------------------------------
# build and install binutils
#---------------------------------------------------------------------------------
mkdir -p $target/binutils
pushd $target/binutils
if [ ! -f configured-binutils ]
then
CPPFLAGS="$cppflags $CPPFLAGS" LDFLAGS="$ldflags $LDFLAGS" ../../binutils-$BINUTILS_VER/configure \
--prefix=$prefix --target=$target \
--disable-nls --disable-werror \
--disable-shared --disable-debug \
--enable-lto --enable-plugins \
--enable-poison-system-directories \
$CROSS_PARAMS \
|| { echo "Error configuring binutils"; exit 1; }
touch configured-binutils
fi
if [ ! -f built-binutils ]
then
$MAKE || { echo "Error building binutils"; exit 1; }
touch built-binutils
fi
if [ ! -f installed-binutils ]
then
$MAKE install || { echo "Error installing binutils"; exit 1; }
touch installed-binutils
fi
popd