toolchain: changements aux scripts
[glg-lfs.git] / toolchain / scripts / Binutils-2.23.1-Pass_2
blob74987ff5b1b7282e4572fd5c6bcb191562773a1d
1 #!/bin/bash
3 pkgname="binutils-2.23.1"
4 archive="$pkgname".tar.bz2
5 tar_flags="-xjf"
6 make_flags="--jobs=4 --quiet"
8 set -u
9 set -e
11 cd $LFS/sources
13 echo "======> extraction de l'archive $archive"
14 tar "$tar_flags" "$archive"
16 mkdir -v "$pkgname"-build
17 cd "$pkgname"-build
19 echo "======> exécution du script de configuration"
20 CC=$LFS_TGT-gcc \
21 AR=$LFS_TGT-ar \
22 RANLIB=$LFS_TGT-ranlib \
23 ../$pkgname/configure --quiet --prefix=/tools \
24 --disable-nls \
25 --with-lib-path=/tools/lib \
26 --with-sysroot
28 echo "======> compilation de $pkgname"
29 make $make_flags
31 echo "======> installation de $pkgname"
32 make install
34 echo "======> prepration du linker pour les prochaines phases"
35 make -C ld clean
36 make -C ld LIB_PATH=/usr/lib:/lib
37 cp ld/ld-new /tools/bin
39 echo "======> supression du rÃpertoire" "$pkgname"-build
40 cd ../
41 rm -rf "$pkgname"-build
43 echo "======> supression du rÃpertoire $pkgname"
44 rm -rf "$pkgname"
46 echo "======> compilation et installation de $pkgname reussi"
47 exit 0