# HG changeset patch # User Pascal Bellard # Date 1427182981 -3600 # Node ID 09581cbfaf3e23c0c070ae22ef46a885e1ecd11d # Parent 7a17da60607476067931e515b99dd363ebf27632 Add gcc49 diff -r 7a17da606074 -r 09581cbfaf3e gcc49/description.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc49/description.txt Tue Mar 24 08:43:01 2015 +0100 @@ -0,0 +1,3 @@ +The GNU Compiler Collection includes front ends for C, C++, Objective-C, +Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++, +libgcj,...). diff -r 7a17da606074 -r 09581cbfaf3e gcc49/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc49/receipt Tue Mar 24 08:43:01 2015 +0100 @@ -0,0 +1,133 @@ +# SliTaz package receipt. + +PACKAGE="gcc49" +SOURCE="gcc" +VERSION="4.9.2" +CATEGORY="development" +SHORT_DESC="The the GNU Compiler Collection." +MAINTAINER="pankso@slitaz.org" +LICENSE="GPL2" +TARBALL="$SOURCE-$VERSION.tar.bz2" +WEB_SITE="http://gcc.gnu.org/" +WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL" +TAGS="compiler C" +#HOST_ARCH="i486 arm" + +# We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS +# for cookutils that are not used by tazwok/cook-toolchain since it install +# and use it's own copy. +DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils" +BUILD_DEPENDS="mpc-library mpfr-dev gmp-dev elfutils-dev" + +# Handle cross compilation (native i486/ARM gcc) +case "$ARCH" in + i?86) + ARCH_ARGS="--with-tune=$ARCH" + pkgversion="SliTaz" + languages="c,c++,objc,fortran" ;; + arm*) + pkgversion="SliTaz ARM" + languages="c,c++" ;; +esac + +# Rules to configure and make the package. +compile_rules() +{ + # Package slitaz-toolchain use 'cook --options' when rebuilding + # the full SliTaz toolchain. + [ "$2" == "--first-pass" ] && opt=$2 + [ "$3" == "--first-pass" ] && opt=$3 + + # Use libiberty.a from binutils. + sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1 + + case "$ARCH" in + i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;; + esac + + #sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + mkdir -p ../gcc-build && cd ../gcc-build + + # This is the default GCC and we want a native build to cross compile after. + # SliTaz target i486 host so we need a native i486 build for GCC. + case "$opt" in + --first-pass) + # Used by slitaz-toolchain when rebuilding the full toolchain. + echo "cook: configure GCC for: toolchain first pass" + $src/configure \ + --libexecdir=/usr/lib \ + --disable-nls \ + --enable-shared \ + --enable-languages=c,c++ \ + --disable-libstdcxx-pch \ + --enable-__cxa_atexit \ + --enable-clocale=gnu \ + --enable-threads=posix \ + --disable-bootstrap \ + --program-suffix=-49 \ + ${CONFIGURE_ARGS} && + make && make install ;; + *) + # Used by default to produce a full featured X86 GCC compiler. + echo "cook: configure GCC for: final/full build" + $src/configure \ + --libexecdir=/usr/lib \ + --enable-nls \ + --enable-languages=${languages} \ + --enable-shared \ + --with-system-zlib \ + --enable-clocale=gnu \ + --enable-objc-gc \ + --enable-__cxa_atexit \ + --enable-lto \ + --enable-threads=posix \ + --disable-bootstrap \ + --program-suffix=-49 \ + --with-pkgversion="$pkgversion" \ + ${CONFIGURE_ARGS} ${ARCH_ARGS} && + make && make install ;; + esac +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share + cp -a $install/usr/bin $fs/usr + + # Copy all libs. Remove libgcc_s.so and libstdc++.so they goes in + # the gcc-lib-base package. + cp -a $install/usr/lib $fs/usr + rm -f $fs/usr/lib/libgcc_s.so* + rm -f $fs/usr/lib/libstdc++.so* + rm -f $fs/usr/lib/libgomp.so* + rm -f $fs/usr/lib/libobjc.so* + + # Include files. + cp -a $install/usr/include $fs/usr + + # Gfortran goes in gfortran package. + rm -f $fs/usr/bin/*gfortran + rm -f $fs/usr/lib/libgfortran* + rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran* + rm -rf $fs/usr/lib/gcc/*/$VERSION/f* + + # Remove build directory. + rm -rf $WOK/$PACKAGE/source/$PACKAGE-build + rm -rf $WOK/$PACKAGE/$PACKAGE-build +} + +# Post install commands for Tazpkg. +post_install() +{ + local root + root=$1 + echo "Processing post-install commands..." + if [ ! -f "$root/lib/cpp" ]; then + ln -s ../usr/bin/cpp $root/lib + fi + if [ ! -f "$root/usr/bin/cc" ]; then + ln -s gcc $root/usr/bin/cc + fi +} diff -r 7a17da606074 -r 09581cbfaf3e llvm/receipt --- a/llvm/receipt Tue Mar 24 01:34:13 2015 -0400 +++ b/llvm/receipt Tue Mar 24 08:43:01 2015 +0100 @@ -11,12 +11,12 @@ WGET_URL="${WEB_SITE}releases/$VERSION/$TARBALL" DEPENDS="libffi gcc-lib-base" -BUILD_DEPENDS="libffi-dev libffi perl" +BUILD_DEPENDS="libffi-dev libffi perl gcc49" # Rules to configure and make the package. compile_rules() { - cd $src + export CC="gcc-49" ./configure --prefix=/usr --sysconfdir=/etc \ --enable-libffi \ --enable-optimized \