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