3 then echo "Please run as root using 'sudo bash'"
7 # change into $SUDO_USER home directory
9 mkdir
-p src
/binutils-gdb
12 apt-get
install -y libcurl3-gnutls git git-man
14 git clone https
://git.libre-soc.org
/git
/binutils-gdb.git
16 # Steps to compile binutils-gdb
18 ## Necessary software to install
20 apt-get
install -y build-essential libgmp-dev libmpfr-dev \
21 bison flex
file texinfo dejagnu
23 if [ "`arch`" = "x86_64" ]; then
24 apt-get
install -y g
++-powerpc64le-linux-gnu
31 if [ "`arch`" = "x86_64" ]; then
32 export HOST
="x86_64-pc-linux-gnu"
33 elif [ "`arch`" = "ppc64le" ]; then
34 export HOST
="powerpc64le-linux-gnu"
39 mkdir ..
/binutils-gdb-build
40 cd ..
/binutils-gdb-build
41 AR
=ar AS
=as ..
/binutils-gdb
/configure
--prefix=/usr
/local
/binutils-gdb \
42 --host=${HOST} --target=powerpc64le-linux-gnu
--disable-nls --enable-shared \
43 --enable-64-bit-bfd --disable-multilib --enable-ld=default
--enable-gold=yes \
44 --enable-plugins --enable-threads
46 # make check |& tee chk.log
50 cd /home
/$SUDO_USER/src
/binutils-gdb