wok-undigest rev 1139
UP: gcc 4.9.2
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Thu Feb 12 21:39:42 2015 +0000 (2015-02-12) |
parents | 613d5c3f155f |
children | 13c934c094d4 |
files | gcc-lib-base/receipt gcc/receipt |
line diff
1.1 --- a/gcc-lib-base/receipt Fri Jan 16 02:51:58 2015 +0200 1.2 +++ b/gcc-lib-base/receipt Thu Feb 12 21:39:42 2015 +0000 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="gcc-lib-base" 1.7 -VERSION="4.8.1" 1.8 +VERSION="4.9.2" 1.9 CATEGORY="development" 1.10 SHORT_DESC="GCC base libraries, libgcc_s and libstdc++." 1.11 WEB_SITE="http://gcc.gnu.org/" 1.12 @@ -27,4 +27,3 @@ 1.13 cp -a $libdir/libstdc++.so* $fs/usr/lib 1.14 rm -f $fs/usr/lib/*-gdb.py 1.15 } 1.16 -
2.1 --- a/gcc/receipt Fri Jan 16 02:51:58 2015 +0200 2.2 +++ b/gcc/receipt Thu Feb 12 21:39:42 2015 +0000 2.3 @@ -1,7 +1,7 @@ 2.4 # SliTaz package receipt. 2.5 2.6 PACKAGE="gcc" 2.7 -VERSION="4.8.1" 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 @@ -10,126 +10,28 @@ 2.13 WEB_SITE="http://gcc.gnu.org/" 2.14 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL" 2.15 TAGS="compiler C" 2.16 +#HOST_ARCH="i486 arm" 2.17 2.18 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS 2.19 # for cookutils that are not used by tazwok/cook-toolchain since it install 2.20 # and use it's own copy. 2.21 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils" 2.22 -BUILD_DEPENDS="elfutils mpc-library mpfr mpfr-dev gmp gmp-dev \ 2.23 -elfutils-dev" 2.24 +BUILD_DEPENDS="mpc-library mpfr-dev gmp-dev elfutils-dev" 2.25 2.26 -# Rules to compile & install the temporary toolchain. 2.27 -precook_tmp_toolchain() 2.28 -{ 2.29 - report open-bloc 2.30 - cd $src 2.31 - 2.32 - # GCC requires the GMP, MPFR and MPC packages. 2.33 - tazwok get-src mpfr --target=$PWD/mpfr || { report close-bloc; return 1; } 2.34 - tazwok get-src gmp --target=$PWD/gmp || { report close-bloc; return 1; } 2.35 - tazwok get-src mpc-library --target=$PWD/mpc || { report close-bloc; return 1; } 2.36 - 2.37 - report step "Running compilation" 2.38 - 2.39 - # Use libiberty.a from binutils. 2.40 - sed -i 's/install_to_$(INSTALL_DEST) //' \ 2.41 - libiberty/Makefile.in || return 1 2.42 - 2.43 - # Build it in a separate directory. 2.44 - mkdir ../gcc-build 2.45 - cd ../gcc-build 2.46 - 2.47 - { $src/configure \ 2.48 - --target=$HOST_SYSTEM \ 2.49 - --disable-nls --disable-shared --disable-multilib \ 2.50 - --disable-decimal-float --disable-threads \ 2.51 - --disable-libmudflap --disable-libssp \ 2.52 - --disable-libgomp --enable-languages=c \ 2.53 - --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \ 2.54 - --without-ppl --without-cloog && 2.55 - make && 2.56 - make install 2.57 - } 2>&1 | sed 's/: execvp: No such file/: execvp: no such file/' || 2.58 - { report close-bloc; return 1; } 2.59 - 2.60 - # See LFS for more detais about this. 2.61 - ln -s libgcc.a `$HOST_SYSTEM-gcc -print-libgcc-file-name | \ 2.62 - sed 's/libgcc/&_eh/'` 2.63 - report close-bloc 2.64 -} 2.65 - 2.66 -cook_tmp_toolchain() 2.67 -{ 2.68 - report open-bloc 2.69 - cd $src 2.70 - patch -Np1 -i $stuff/gcc-$VERSION-startfiles_fix-1.patch || { report close-bloc; return 1; } 2.71 - 2.72 - # Details about theses lines are in LFS book. 2.73 - sed 's@\./fixinc\.sh@-c true@' -i gcc/Makefile.in 2.74 - sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' -i gcc/Makefile.in 2.75 - for file in \ 2.76 - $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) 2.77 - do 2.78 - sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ 2.79 - -e 's@/usr@/tools@g' -i $file 2.80 - echo ' 2.81 -#undef STANDARD_INCLUDE_DIR 2.82 -#define STANDARD_INCLUDE_DIR 0 2.83 -#define STANDARD_STARTFILE_PREFIX_1 "" 2.84 -#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file 2.85 - done 2.86 - 2.87 - if [ "$ARCH" = x86_64 ]; then 2.88 - for file in $(find gcc/config -name t-linux64) ; do 2.89 - sed '/MULTILIB_OSDIRNAMES/d' -i $file 2.90 - done 2.91 - fi 2.92 - 2.93 - # GCC requires the GMP, MPFR and MPC packages. 2.94 - tazwok get-src mpfr --target=$PWD/mpfr || { report close-bloc; return 1; } 2.95 - tazwok get-src gmp --target=$PWD/gmp || { report close-bloc; return 1; } 2.96 - tazwok get-src mpc-library --target=$PWD/mpc || { report close-bloc; return 1; } 2.97 - 2.98 - report step "Running compilation" 2.99 - 2.100 - # Use libiberty.a from binutils. 2.101 - sed -i 's/install_to_$(INSTALL_DEST) //' \ 2.102 - libiberty/Makefile.in || return 1 2.103 - 2.104 - # Build it in a separate directory. 2.105 - mkdir ../gcc-build 2.106 - cd ../gcc-build 2.107 - 2.108 - { CC="$HOST_SYSTEM-gcc -B/tools/lib/" \ 2.109 - AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \ 2.110 - $src/configure \ 2.111 - --with-local-prefix=/tools --enable-clocale=gnu \ 2.112 - --enable-shared --enable-threads=posix \ 2.113 - --enable-__cxa_atexit --enable-languages=c,c++ \ 2.114 - --disable-libstdcxx-pch --disable-multilib \ 2.115 - --disable-bootstrap --disable-libgomp \ 2.116 - --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \ 2.117 - --without-ppl --without-cloog && 2.118 - make && 2.119 - make install 2.120 - } 2>&1 | sed 's/: execvp: No such file/: execvp: no such file/' || 2.121 - { report close-bloc; return 1; } 2.122 - ln -s gcc /tools/bin/cc 2.123 - report close-bloc 2.124 -} 2.125 +# Handle cross compilation (native i486/ARM gcc) 2.126 +case "$ARCH" in 2.127 + i?86) 2.128 + ARCH_ARGS="--with-tune=$ARCH" 2.129 + pkgversion="SliTaz" 2.130 + languages="c,c++,objc,fortran" ;; 2.131 + arm*) 2.132 + pkgversion="SliTaz ARM" 2.133 + languages="c,c++" ;; 2.134 +esac 2.135 2.136 # Rules to configure and make the package. 2.137 compile_rules() 2.138 { 2.139 - cd $src 2.140 - 2.141 - # SliTaz is a Busybox based OS, why we so small and fast. Using gawk by 2.142 - # default to build package will not ensure package work with Busybox awk 2.143 - # and so should NOT be use to cook. 2.144 - if [ -x /usr/bin/cook ]; then 2.145 - [ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk 2.146 - fi 2.147 - 2.148 # Package slitaz-toolchain use 'cook --options' when rebuilding 2.149 # the full SliTaz toolchain. 2.150 [ "$2" == "--first-pass" ] && opt=$2 2.151 @@ -138,9 +40,8 @@ 2.152 # Use libiberty.a from binutils. 2.153 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1 2.154 2.155 - case $ARCH in 2.156 - i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' \ 2.157 - gcc/Makefile.in ;; 2.158 + case "$ARCH" in 2.159 + i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;; 2.160 esac 2.161 2.162 #sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in 2.163 @@ -163,8 +64,7 @@ 2.164 --enable-clocale=gnu \ 2.165 --enable-threads=posix \ 2.166 --disable-bootstrap \ 2.167 - --build=$HOST_SYSTEM \ 2.168 - --host=$HOST_SYSTEM && 2.169 + ${CONFIGURE_ARGS} && 2.170 make && make install ;; 2.171 *) 2.172 # Used by default to produce a full featured X86 GCC compiler. 2.173 @@ -172,7 +72,7 @@ 2.174 $src/configure \ 2.175 --libexecdir=/usr/lib \ 2.176 --enable-nls \ 2.177 - --enable-languages=c,c++,objc,fortran \ 2.178 + --enable-languages=${languages} \ 2.179 --enable-shared \ 2.180 --with-system-zlib \ 2.181 --enable-clocale=gnu \ 2.182 @@ -181,12 +81,10 @@ 2.183 --enable-lto \ 2.184 --enable-threads=posix \ 2.185 --disable-bootstrap \ 2.186 - --with-pkgversion="SliTaz" \ 2.187 - --with-tune=$ARCH \ 2.188 - --build=$HOST_SYSTEM \ 2.189 - --host=$HOST_SYSTEM && 2.190 + --with-pkgversion="$pkgversion" \ 2.191 + ${CONFIGURE_ARGS} ${ARCH_ARGS} && 2.192 make && make install ;; 2.193 - esac 2>&1 | sed 's/: execvp: No such file/: execvp: no such file/' 2.194 + esac 2.195 } 2.196 2.197 # Rules to gen a SliTaz package suitable for Tazpkg.