wok-6.x rev 17845
Add gcc49
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Mar 24 08:43:01 2015 +0100 (2015-03-24) |
parents | 7a17da606074 |
children | ae76ef329371 |
files | gcc49/description.txt gcc49/receipt llvm/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gcc49/description.txt Tue Mar 24 08:43:01 2015 +0100 1.3 @@ -0,0 +1,3 @@ 1.4 +The GNU Compiler Collection includes front ends for C, C++, Objective-C, 1.5 +Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++, 1.6 +libgcj,...).
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/gcc49/receipt Tue Mar 24 08:43:01 2015 +0100 2.3 @@ -0,0 +1,133 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="gcc49" 2.7 +SOURCE="gcc" 2.8 +VERSION="4.9.2" 2.9 +CATEGORY="development" 2.10 +SHORT_DESC="The the GNU Compiler Collection." 2.11 +MAINTAINER="pankso@slitaz.org" 2.12 +LICENSE="GPL2" 2.13 +TARBALL="$SOURCE-$VERSION.tar.bz2" 2.14 +WEB_SITE="http://gcc.gnu.org/" 2.15 +WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL" 2.16 +TAGS="compiler C" 2.17 +#HOST_ARCH="i486 arm" 2.18 + 2.19 +# We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS 2.20 +# for cookutils that are not used by tazwok/cook-toolchain since it install 2.21 +# and use it's own copy. 2.22 +DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils" 2.23 +BUILD_DEPENDS="mpc-library mpfr-dev gmp-dev elfutils-dev" 2.24 + 2.25 +# Handle cross compilation (native i486/ARM gcc) 2.26 +case "$ARCH" in 2.27 + i?86) 2.28 + ARCH_ARGS="--with-tune=$ARCH" 2.29 + pkgversion="SliTaz" 2.30 + languages="c,c++,objc,fortran" ;; 2.31 + arm*) 2.32 + pkgversion="SliTaz ARM" 2.33 + languages="c,c++" ;; 2.34 +esac 2.35 + 2.36 +# Rules to configure and make the package. 2.37 +compile_rules() 2.38 +{ 2.39 + # Package slitaz-toolchain use 'cook --options' when rebuilding 2.40 + # the full SliTaz toolchain. 2.41 + [ "$2" == "--first-pass" ] && opt=$2 2.42 + [ "$3" == "--first-pass" ] && opt=$3 2.43 + 2.44 + # Use libiberty.a from binutils. 2.45 + sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1 2.46 + 2.47 + case "$ARCH" in 2.48 + i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;; 2.49 + esac 2.50 + 2.51 + #sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in 2.52 + 2.53 + mkdir -p ../gcc-build && cd ../gcc-build 2.54 + 2.55 + # This is the default GCC and we want a native build to cross compile after. 2.56 + # SliTaz target i486 host so we need a native i486 build for GCC. 2.57 + case "$opt" in 2.58 + --first-pass) 2.59 + # Used by slitaz-toolchain when rebuilding the full toolchain. 2.60 + echo "cook: configure GCC for: toolchain first pass" 2.61 + $src/configure \ 2.62 + --libexecdir=/usr/lib \ 2.63 + --disable-nls \ 2.64 + --enable-shared \ 2.65 + --enable-languages=c,c++ \ 2.66 + --disable-libstdcxx-pch \ 2.67 + --enable-__cxa_atexit \ 2.68 + --enable-clocale=gnu \ 2.69 + --enable-threads=posix \ 2.70 + --disable-bootstrap \ 2.71 + --program-suffix=-49 \ 2.72 + ${CONFIGURE_ARGS} && 2.73 + make && make install ;; 2.74 + *) 2.75 + # Used by default to produce a full featured X86 GCC compiler. 2.76 + echo "cook: configure GCC for: final/full build" 2.77 + $src/configure \ 2.78 + --libexecdir=/usr/lib \ 2.79 + --enable-nls \ 2.80 + --enable-languages=${languages} \ 2.81 + --enable-shared \ 2.82 + --with-system-zlib \ 2.83 + --enable-clocale=gnu \ 2.84 + --enable-objc-gc \ 2.85 + --enable-__cxa_atexit \ 2.86 + --enable-lto \ 2.87 + --enable-threads=posix \ 2.88 + --disable-bootstrap \ 2.89 + --program-suffix=-49 \ 2.90 + --with-pkgversion="$pkgversion" \ 2.91 + ${CONFIGURE_ARGS} ${ARCH_ARGS} && 2.92 + make && make install ;; 2.93 + esac 2.94 +} 2.95 + 2.96 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.97 +genpkg_rules() 2.98 +{ 2.99 + mkdir -p $fs/usr/share 2.100 + cp -a $install/usr/bin $fs/usr 2.101 + 2.102 + # Copy all libs. Remove libgcc_s.so and libstdc++.so they goes in 2.103 + # the gcc-lib-base package. 2.104 + cp -a $install/usr/lib $fs/usr 2.105 + rm -f $fs/usr/lib/libgcc_s.so* 2.106 + rm -f $fs/usr/lib/libstdc++.so* 2.107 + rm -f $fs/usr/lib/libgomp.so* 2.108 + rm -f $fs/usr/lib/libobjc.so* 2.109 + 2.110 + # Include files. 2.111 + cp -a $install/usr/include $fs/usr 2.112 + 2.113 + # Gfortran goes in gfortran package. 2.114 + rm -f $fs/usr/bin/*gfortran 2.115 + rm -f $fs/usr/lib/libgfortran* 2.116 + rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran* 2.117 + rm -rf $fs/usr/lib/gcc/*/$VERSION/f* 2.118 + 2.119 + # Remove build directory. 2.120 + rm -rf $WOK/$PACKAGE/source/$PACKAGE-build 2.121 + rm -rf $WOK/$PACKAGE/$PACKAGE-build 2.122 +} 2.123 + 2.124 +# Post install commands for Tazpkg. 2.125 +post_install() 2.126 +{ 2.127 + local root 2.128 + root=$1 2.129 + echo "Processing post-install commands..." 2.130 + if [ ! -f "$root/lib/cpp" ]; then 2.131 + ln -s ../usr/bin/cpp $root/lib 2.132 + fi 2.133 + if [ ! -f "$root/usr/bin/cc" ]; then 2.134 + ln -s gcc $root/usr/bin/cc 2.135 + fi 2.136 +}
3.1 --- a/llvm/receipt Tue Mar 24 01:34:13 2015 -0400 3.2 +++ b/llvm/receipt Tue Mar 24 08:43:01 2015 +0100 3.3 @@ -11,12 +11,12 @@ 3.4 WGET_URL="${WEB_SITE}releases/$VERSION/$TARBALL" 3.5 3.6 DEPENDS="libffi gcc-lib-base" 3.7 -BUILD_DEPENDS="libffi-dev libffi perl" 3.8 +BUILD_DEPENDS="libffi-dev libffi perl gcc49" 3.9 3.10 # Rules to configure and make the package. 3.11 compile_rules() 3.12 { 3.13 - cd $src 3.14 + export CC="gcc-49" 3.15 ./configure --prefix=/usr --sysconfdir=/etc \ 3.16 --enable-libffi \ 3.17 --enable-optimized \