summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorLukc <lukc@upyum.com>2010-12-30 10:51:42 +0100
committerLukc <lukc@upyum.com>2010-12-30 10:51:42 +0100
commitefebc3001ba009bab4783432cc3c0c2a5e643d6f (patch)
tree7962c320a100abc09be0188138517e92a89397b6 /gcc
parent943a286fb9156acb18928c1578d9499c79bcc172 (diff)
downloaddevel-efebc3001ba009bab4783432cc3c0c2a5e643d6f.tar.gz
devel-efebc3001ba009bab4783432cc3c0c2a5e643d6f.tar.bz2
devel-efebc3001ba009bab4783432cc3c0c2a5e643d6f.tar.xz
devel-efebc3001ba009bab4783432cc3c0c2a5e643d6f.zip
Recette de gcc mise à jour.
* $name remplacée par « gcc » dans build(), pour éviter les problèmes de nom en cas de compilation d’un compilateur croisé. * CROSS_TARGET devient maintenant CROSS_TRIPLET.
Diffstat (limited to 'gcc')
-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
}