summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/Pkgfile22
1 files changed, 13 insertions, 9 deletions
diff --git a/gcc/Pkgfile b/gcc/Pkgfile
index 19fda52..56bdb8d 100644
--- a/gcc/Pkgfile
+++ b/gcc/Pkgfile
@@ -4,12 +4,12 @@ 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.1
+version=4.5.2
release=1
source=(
http://ftp.gnu.org/gnu/$name/$name-$version/$name-core-$version.tar.bz2
@@ -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
}