summaryrefslogtreecommitdiffstats
path: root/gcc/Pkgfile
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/Pkgfile')
-rw-r--r--gcc/Pkgfile20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/Pkgfile b/gcc/Pkgfile
index a7b2ad4..56bdb8d 100644
--- a/gcc/Pkgfile
+++ b/gcc/Pkgfile
@@ -4,10 +4,10 @@ maintainer="Lukc <lukc AT upyum DOT com>"
url="http://$name.gnu.org"
depends=(binutils zlib libmpc)
-if [[ -z ${CROSS_TARGET} ]]; then
+if [[ -z ${CROSS_TRIPLET} ]]; then
name=gcc
else
- name=gcc-$CROSS_TARGET
+ name=gcc-$CROSS_TRIPLET
fi
version=4.5.2
release=1
@@ -19,10 +19,10 @@ source=(
)
build ()
{
- patch -d $name-$version -p1 -i $SRC/$name-nocheck-fixincludes.patch;
+ patch -d gcc-$version -p1 -i $SRC/gcc-nocheck-fixincludes.patch;
mkdir build;
cd build;
- ../$name-$version/configure \
+ ../gcc-$version/configure \
${CHOST:+--build=${CHOST}} \
${CTARGET:+--host=${CTARGET}} \
${CROSS_TRIPLET:+--target=${CROSS_TRIPLET}} \
@@ -38,15 +38,19 @@ build ()
--with-x=no \
--with-system-zlib \
--with-pkgversion="Nutritive";
- make bootstrap;
+ if [[ -z "${CROSS_TRIPLET}" ]]; 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 $name $PKG$bindir/cc;
+ ln -sf gcc $PKG$bindir/cc;
ln -sf g++ $PKG$bindir/c++;
- mv $PKG$libdir/$name/*/$version/include-fixed/{limits.h,syslimits.h} $PKG$libdir/$name/*/$version/include/;
+ 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/$name/*/$version/{install-tools,include-fixed};
+ #rm -r $PKG$libdir/gcc/*/$version/{install-tools,include-fixed};
sed -i "s|-L$SRC[^ ]* ||g" $PKG$libdir/{libstdc++.la,libsupc++.la} || true
}