major changes to improve toolchain and crossbuild concept, still in devel!
[hdw-linux/hdw-linux.git] / packages / base / binutils / binutils
1 # hdw - linux binutils package
2
3 # author: hackbard@hackdaworld.dyndns.org
4 #
5 ## [V] 2.15
6 # [V] 2.15.91.0.1
7 # [S] 2-4 2-5
8 ## [D] binutils-2.15.tar.bz2 ftp://ftp.gnu.org/gnu/binutils/
9 # [D] binutils-2.15.91.0.1.tar.bz2 http://ftp.kernel.org/pub/linux/devel/binutils/
10
11 libpath="/usr/lib:/lib"
12
13 if [ "$priority" = "4" ] ; then
14         flist_path="$flist_path ${s1_prefix}/"
15         flist_pruned="$flist_pruned|specs"
16         custmain=1
17         custmain()      {
18                 # install binutils linking against new libc
19                 cd $root/tmp/src.binutils/binutils-build
20                 make -C ld INSTALL=/${s1_prefix}/bin/install install
21                 cd -
22                 rm -rf $root/tmp/src.binutils
23
24                 # show new linker to gcc
25                 cr="" ; [ "$hdw_crossbuild" != "0" ] && cr=/${s1_prefix}
26                 SPECFILE="`gcc --print-file specs`"
27         sed -e "s@ /${s1_prefix}/lib/ld-linux.so.2@ $cr/lib/ld-linux.so.2@g" \
28             -e "s@ /${s1_prefix}/lib/ld.so.1@ $cr/lib/ld.so.1@g" \
29                         $SPECFILE > tempspecfile
30                 mv tempspecfile $SPECFILE
31                 unset SPECFILE
32                         }
33 fi
34
35 if [ "$priority" = "5" ] ; then
36         confopt="$confopt --enable-shared --disable-nls"
37         make_conf="tooldir=$root/usr"
38         install_conf="tooldir=$root/usr"
39         post_install()  {
40                 cp ../binutils-$ver/include/libiberty.h \
41                                 $prefix/include
42                         }
43
44         build_main()    {
45                 mkdir -p ../binutils-build &&
46                 cd ../binutils-build &&
47                 ../binutils-${ver}/configure $confopt &&
48                 make $make_conf &&
49                 make $install_conf install
50                         }
51 fi