blob: 87b623e3976f544f12709861c9479c89954545f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
description="The GNU Compiler Collection."
packager="CRUX System Team <core-ports AT crux DOT nu>"
maintainer="Lukc <lukc AT upyum DOT com>"
url="http://$name.gnu.org"
depends=(binutils zlib libmpc)
if [[ -z ${CTARGET} ]]; then
name=gcc
else
name=gcc-$CTARGET
fi
version=4.5.2
release=1
source=(
http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-core-$version.tar.bz2
http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-g++-$version.tar.bz2
http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-objc-$version.tar.bz2
gcc-nocheck-fixincludes.patch
)
build ()
{
patch -d gcc-$version -p1 -i $SRC/gcc-nocheck-fixincludes.patch;
mkdir build;
cd build;
../gcc-$version/configure \
${CBUILD:+--build=${CBUILD}} \
${CHOST:+--host=${CHOST}} \
${CTARGET:+--target=${CTARGET}} \
--prefix=$prefix \
--mandir=$mandir \
--libexecdir=$libdir \
--enable-languages=c,c++,objc \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu \
--enable-shared \
$(use_enable nls) \
--with-x=no \
--with-system-zlib \
--with-pkgversion="Nutritive";
if [[ -z "${CTARGET}" ]]; then
make bootstrap;
else
make;
fi
make -j1 check;
make -j1 DESTDIR=$PKG install;
mkdir $PKG/lib;
ln -sf ..$bindir/cpp $PKG/lib/cpp;
ln -sf gcc $PKG$bindir/cc;
ln -sf g++ $PKG$bindir/c++;
mv $PKG$libdir/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG$libdir/gcc/*/$version/include/;
rm $PKG$libdir/{libiberty.a,libstdc++.so.6.0.14-gdb.py};
#rm -r $PKG$libdir/gcc/*/$version/{install-tools,include-fixed};
sed -i "s|-L$SRC[^ ]* ||g" $PKG$libdir/{libstdc++.la,libsupc++.la} || true
}
|