]> hackdaworld.org Git - hdw-linux/hdw-linux.git/blob - packages/base/gcc/gcc
another udev-fix
[hdw-linux/hdw-linux.git] / packages / base / gcc / gcc
1 # hdw - linux gcc package
2 #
3 # author: hackbard@hackdaworld.dyndns.org
4 #
5 # [V] 3.3.4
6 # [S] 2-5
7 # [D] gcc-3.3.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3.4/
8 # [D] gcc-g++-3.3.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3.4/
9 # [D] gcc-g77-3.3.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3.4/
10
11 extraver="-${ver}"
12 [ "$ver" = "cvs" ] && extraver=""
13
14 confopt="$confopt --enable-languages=c,c++,f77"
15 confopt="$confopt --enable-shared --enable-clocale=gnu"
16 confopt="$confopt --enable-threads=posix --enable-__cxa_atexit"
17 confopt="$confopt --libexecdir=$prefix/lib"
18
19 # unset CFLAGS CXXFLAGS
20
21 pre_install()   {
22         echo "extracting c++ and fortran sources ..."
23         tar --use-compress-program=$compress -xvf $archdir/gcc-g++-3.3.4.tar.bz2
24         tar --use-compress-program=$compress -xvf $archdir/gcc-g77-3.3.4.tar.bz2
25         echo "patching source (libiberty) ..."
26         mv ./libiberty/Makefile.in ./tmp~
27         sed 's%install_to_$(INSTALL_DEST) %%' ./tmp~ > ./libiberty/Makefile.in
28                 }
29
30 post_install()  {
31         ln -sf ../usr/bin/cpp $root/lib &&
32         ln -sf gcc $root/usr/bin/cc
33                 }
34
35 build_main()    {
36         mkdir -p ../gcc-build && cd ../gcc-build
37         ../gcc${extraver}/configure $confopt
38         make
39         make install
40                 }