From efebc3001ba009bab4783432cc3c0c2a5e643d6f Mon Sep 17 00:00:00 2001 From: Lukc Date: Thu, 30 Dec 2010 10:51:42 +0100 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gcc/Pkgfile | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/Pkgfile b/gcc/Pkgfile index a7b2ad4..56bdb8d 100644 --- a/gcc/Pkgfile +++ b/gcc/Pkgfile @@ -4,10 +4,10 @@ maintainer="Lukc " 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 } -- cgit v1.2.3-70-g09d2