# HG changeset patch # User Christophe Lincoln # Date 1305864676 -7200 # Node ID 560bead4e3589da8666ad9e570c633c39ce6c9db # Parent d131d96043423263f1496b11d5f9aaa85ff9a72d gcc: we want a native i486 compiler to cross compile full system diff -r d131d9604342 -r 560bead4e358 gcc/receipt --- a/gcc/receipt Fri May 20 04:19:01 2011 +0200 +++ b/gcc/receipt Fri May 20 06:11:16 2011 +0200 @@ -91,8 +91,6 @@ { CC="$BUILD_HOST-gcc -B/tools/lib/" \ AR=$BUILD_HOST-ar RANLIB=$BUILD_HOST-ranlib \ - # --disable-bootstrap dont exist ??? - # See: ./configure --help | grep bootstrap $src/configure \ --with-local-prefix=/tools --enable-clocale=gnu \ --enable-shared --enable-threads=posix \ @@ -122,7 +120,9 @@ sed -i 's/install_to_$(INSTALL_DEST) //' \ libiberty/Makefile.in || return 1 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. @@ -132,15 +132,16 @@ --disable-nls \ --enable-shared \ --enable-languages=c,c++ \ - --disable-multilib \ --disable-libstdcxx-pch \ --enable-__cxa_atexit \ --enable-clocale=gnu \ --enable-threads=posix \ - $CONFIGURE_ARGS && + --disable-bootstrap \ + --build=$HOST_SYSTEM \ + --host=$HOST_SYSTEM && make && make install ;; *) - # Used by default to produce a full featured GCC compiler. + # Used by default to produce a full featured X86 GCC compiler. echo "cook: configure GCC for: final/full build" $src/configure \ --libexecdir=/usr/lib \ @@ -153,8 +154,11 @@ --enable-__cxa_atexit \ --enable-lto \ --enable-threads=posix \ + --disable-bootstrap \ + --with-pkgversion="SliTaz" \ --with-tune=$ARCH \ - $CONFIGURE_ARGS && + --build=$HOST_SYSTEM \ + --host=$HOST_SYSTEM && make && make install ;; esac } @@ -166,7 +170,7 @@ cp -a $_pkg/usr/bin $fs/usr # Copy all libs. Remove libgcc_s.so and libstdc++.so they goes in - # the gcc-lib-base-$VERSION package. + # the gcc-lib-base package. cp -a $_pkg/usr/lib $fs/usr rm -f $fs/usr/lib/libgcc_s.so* rm -f $fs/usr/lib/libstdc++.so* @@ -176,7 +180,7 @@ # Include files. cp -a $_pkg/usr/include $fs/usr - # Gfortran goes in gfortran-$VERSION package. + # 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* diff -r d131d9604342 -r 560bead4e358 slitaz-toolchain/receipt --- a/slitaz-toolchain/receipt Fri May 20 04:19:01 2011 +0200 +++ b/slitaz-toolchain/receipt Fri May 20 06:11:16 2011 +0200 @@ -41,7 +41,6 @@ echo "cook: GCC first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog cook gcc --install --first-pass cook gcc-lib-base --install - cook libobjc --install # 3. linux-api-headers echo "cook: linux API headers: $(date '+%Y-%m-%d %H:%M')" >> $tmplog @@ -60,9 +59,13 @@ # 6. gcc (final) echo "cook: GCC final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog - cook gcc --install - cook gcc-lib-base --install - cook libobjc --install + for i in gcc gcc-lib-base libobjc + do + echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog + cook $i --install + done + cook libgfortran + cook gfortran # All packages cooked got ther own log so we dont keep them. separator >> $tmplog && echo "" >> $tmplog @@ -81,6 +84,7 @@ cat > $fs/usr/share/doc/slitaz/toolchain.txt << EOT SliTaz GNU/Linux toolchain ================================================================================ + Build date : $(date "+%Y-%m-%d") Build system : $BUILD_SYSTEM Host system : $HOST_SYSTEM @@ -92,6 +96,8 @@ * GCC $gcc * Glibc $glibc +Documentation: http://doc.slitaz.org/en:cookbook:toolchain + ================================================================================ EOT