# HG changeset patch # User Christophe Lincoln # Date 1397069475 -7200 # Node ID 3a1e8d25c3209852ba9f35ccb56e47560c25e1c2 # Parent 03d5ff1ebd837f51946ccb01e3601783001a8b27 ARM: add mpfr + mpc-library (to cook native ARM gcc) and try to fix glib (gtk crashe are from libgobject-2.0.so.0) diff -r 03d5ff1ebd83 -r 3a1e8d25c320 gcc/receipt --- a/gcc/receipt Wed Apr 09 15:40:42 2014 +0200 +++ b/gcc/receipt Wed Apr 09 20:51:15 2014 +0200 @@ -10,124 +10,28 @@ 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="elfutils mpc-library mpfr mpfr-dev gmp gmp-dev \ -elfutils-dev" +BUILD_DEPENDS="mpc-library mpfr-dev gmp-dev elfutils-dev" -# Rules to compile & install the temporary toolchain. -precook_tmp_toolchain() -{ - report open-bloc - cd $src - - # GCC requires the GMP, MPFR and MPC packages. - tazwok get-src mpfr --target=$PWD/mpfr || { report close-bloc; return 1; } - tazwok get-src gmp --target=$PWD/gmp || { report close-bloc; return 1; } - tazwok get-src mpc-library --target=$PWD/mpc || { report close-bloc; return 1; } - - report step "Running compilation" - - # Use libiberty.a from binutils. - sed -i 's/install_to_$(INSTALL_DEST) //' \ - libiberty/Makefile.in || return 1 - - # Build it in a separate directory. - mkdir ../gcc-build - cd ../gcc-build - - { $src/configure \ - --target=$HOST_SYSTEM \ - --disable-nls --disable-shared --disable-multilib \ - --disable-decimal-float --disable-threads \ - --disable-libmudflap --disable-libssp \ - --disable-libgomp --enable-languages=c \ - --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \ - --without-ppl --without-cloog && - make && - make install - } || { report close-bloc; return 1; } - - # See LFS for more detais about this. - ln -s libgcc.a `$HOST_SYSTEM-gcc -print-libgcc-file-name | \ - sed 's/libgcc/&_eh/'` - report close-bloc -} - -cook_tmp_toolchain() -{ - report open-bloc - cd $src - patch -Np1 -i $stuff/gcc-$VERSION-startfiles_fix-1.patch || { report close-bloc; return 1; } - - # Details about theses lines are in LFS book. - sed 's@\./fixinc\.sh@-c true@' -i gcc/Makefile.in - sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' -i gcc/Makefile.in - for file in \ - $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) - do - sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ - -e 's@/usr@/tools@g' -i $file - echo ' -#undef STANDARD_INCLUDE_DIR -#define STANDARD_INCLUDE_DIR 0 -#define STANDARD_STARTFILE_PREFIX_1 "" -#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file - done - - if [ "$ARCH" = x86_64 ]; then - for file in $(find gcc/config -name t-linux64) ; do - sed '/MULTILIB_OSDIRNAMES/d' -i $file - done - fi - - # GCC requires the GMP, MPFR and MPC packages. - tazwok get-src mpfr --target=$PWD/mpfr || { report close-bloc; return 1; } - tazwok get-src gmp --target=$PWD/gmp || { report close-bloc; return 1; } - tazwok get-src mpc-library --target=$PWD/mpc || { report close-bloc; return 1; } - - report step "Running compilation" - - # Use libiberty.a from binutils. - sed -i 's/install_to_$(INSTALL_DEST) //' \ - libiberty/Makefile.in || return 1 - - # Build it in a separate directory. - mkdir ../gcc-build - cd ../gcc-build - - { CC="$HOST_SYSTEM-gcc -B/tools/lib/" \ - AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \ - $src/configure \ - --with-local-prefix=/tools --enable-clocale=gnu \ - --enable-shared --enable-threads=posix \ - --enable-__cxa_atexit --enable-languages=c,c++ \ - --disable-libstdcxx-pch --disable-multilib \ - --disable-bootstrap --disable-libgomp \ - --with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \ - --without-ppl --without-cloog && - make && - make install - } || { report close-bloc; return 1; } - ln -s gcc /tools/bin/cc - report close-bloc -} +# 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() { - cd $src - - # SliTaz is a Busybox based OS, why we so small and fast. Using gawk by - # default to build package will not ensure package work with Busybox awk - # and so should NOT be use to cook. - if [ -x /usr/bin/cook ]; then - [ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk - fi - # Package slitaz-toolchain use 'cook --options' when rebuilding # the full SliTaz toolchain. [ "$2" == "--first-pass" ] && opt=$2 @@ -136,9 +40,8 @@ # 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 ;; + 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 @@ -161,8 +64,7 @@ --enable-clocale=gnu \ --enable-threads=posix \ --disable-bootstrap \ - --build=$HOST_SYSTEM \ - --host=$HOST_SYSTEM && + ${CONFIGURE_ARGS} && make && make install ;; *) # Used by default to produce a full featured X86 GCC compiler. @@ -170,7 +72,7 @@ $src/configure \ --libexecdir=/usr/lib \ --enable-nls \ - --enable-languages=c,c++,objc,fortran \ + --enable-languages=${languages} \ --enable-shared \ --with-system-zlib \ --enable-clocale=gnu \ @@ -179,10 +81,8 @@ --enable-lto \ --enable-threads=posix \ --disable-bootstrap \ - --with-pkgversion="SliTaz" \ - --with-tune=$ARCH \ - --build=$HOST_SYSTEM \ - --host=$HOST_SYSTEM && + --with-pkgversion="$pkgversion" \ + ${CONFIGURE_ARGS} ${ARCH_ARGS} && make && make install ;; esac } diff -r 03d5ff1ebd83 -r 3a1e8d25c320 glib-dev/receipt --- a/glib-dev/receipt Wed Apr 09 15:40:42 2014 +0200 +++ b/glib-dev/receipt Wed Apr 09 20:51:15 2014 +0200 @@ -12,8 +12,12 @@ DEPENDS="glib perl python libffi-dev libgio libgio-dev pcre-dev pkg-config" +# Handle SliTaz arch +case "$SLITAZ_ARCH" in + arm*) VERSION="2.34.3" ;; +esac case "$ARCH" in - arm) VERSION="2.34.3" ;; + arm*) VERSION="2.34.3" ;; esac # Rules to gen a SliTaz package suitable for Tazpkg. diff -r 03d5ff1ebd83 -r 3a1e8d25c320 glib/receipt --- a/glib/receipt Wed Apr 09 15:40:42 2014 +0200 +++ b/glib/receipt Wed Apr 09 20:51:15 2014 +0200 @@ -14,12 +14,17 @@ CROSS_BUGS="arm: glib 2.32.4 error: cannot compute alignment of guint32" DEPENDS="pcre libffi libxml2 elfutils" -BUILD_DEPENDS="pcre-dev libffi-dev gettext zlib-dev perl python python-dev \ +BUILD_DEPENDS="pcre-dev libffi-dev gettext zlib-dev perl python-dev \ elfutils-dev libxml2-dev libxml2-tools automake" +# Handle SliTaz arch +case "$SLITAZ_ARCH" in + arm*) VERSION="2.34.3" ;; +esac + # Handle cross comilation. Use host Perl, Python, etc case "$ARCH" in - arm) + arm*) VERSION="2.34.3" TARBALL="$PACKAGE-$VERSION.tar.xz" WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION:0:4}/$TARBALL" @@ -35,11 +40,10 @@ --sysconfdir=/etc \ --with-pcre=system \ $CONFIGURE_ARGS ;; - arm) + arm*) # Native ARM build --> if ARCH != SLITAZ_ARCH ? - #export LIBTOOL=arm-slitaz-linux-gnueabi-libtool - export LD_LIBRARY_PATH=/cross/arm/sysroot/usr/lib:/usr/lib:/lib - export PKG_CONFIG_LIBPATH=/cross/arm/sysroot/usr/lib/pkgconfig + export LD_LIBRARY_PATH=/cross/$ARCH/sysroot/usr/lib:/usr/lib:/lib + export PKG_CONFIG_LIBPATH=/cross/$ARCH/sysroot/usr/lib/pkgconfig # Glib export glib_cv_stack_grows=${glib_cv_stack_grows=no} @@ -47,7 +51,8 @@ export ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no} export ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no} export ac_cv_type_long_long=${ac_cv_type_long_long=yes} - CC="arm-slitaz-linux-gnueabi-gcc" \ + CC="$HOST_SYSTEM-gcc" \ + LIBTOOL="$HOST_SYSTEM-libtool" \ ./configure \ --sysconfdir=/etc \ --with-pcre=system \ diff -r 03d5ff1ebd83 -r 3a1e8d25c320 libgio-dev/receipt --- a/libgio-dev/receipt Wed Apr 09 15:40:42 2014 +0200 +++ b/libgio-dev/receipt Wed Apr 09 20:51:15 2014 +0200 @@ -12,12 +12,12 @@ DEPENDS="libgio pkg-config" +# Handle SliTaz arch case "$SLITAZ_ARCH" in arm*) VERSION="2.34.3" ;; esac - case "$ARCH" in - arm) VERSION="2.34.3" ;; + arm*) VERSION="2.34.3" ;; esac # Rules to gen a SliTaz package suitable for Tazpkg. diff -r 03d5ff1ebd83 -r 3a1e8d25c320 libgio/receipt --- a/libgio/receipt Wed Apr 09 15:40:42 2014 +0200 +++ b/libgio/receipt Wed Apr 09 20:51:15 2014 +0200 @@ -12,10 +12,10 @@ DEPENDS="glib" +# Handle SliTaz arch case "$SLITAZ_ARCH" in arm*) VERSION="2.34.3" ;; esac - case "$ARCH" in arm*) VERSION="2.34.3" ;; esac diff -r 03d5ff1ebd83 -r 3a1e8d25c320 mpc-library/receipt --- a/mpc-library/receipt Wed Apr 09 15:40:42 2014 +0200 +++ b/mpc-library/receipt Wed Apr 09 20:51:15 2014 +0200 @@ -10,6 +10,8 @@ TARBALL="$SOURCE-$VERSION.tar.gz" WEB_SITE="http://www.multiprecision.org/" WGET_URL="http://www.multiprecision.org/mpc/download/$TARBALL" +HOST_ARCH="i486 arm" + BUGS="Shared libs dont build with 0.9" DEPENDS="mpfr gmp" @@ -17,7 +19,6 @@ compile_rules() { - cd $src #patch -Np1 -i $stuff/libmpc-0.9-configure_cflags_egrep_issue.patch ./configure $CONFIGURE_ARGS && make && make install } diff -r 03d5ff1ebd83 -r 3a1e8d25c320 mpfr-dev/receipt --- a/mpfr-dev/receipt Wed Apr 09 15:40:42 2014 +0200 +++ b/mpfr-dev/receipt Wed Apr 09 20:51:15 2014 +0200 @@ -1,14 +1,14 @@ # SliTaz package receipt PACKAGE="mpfr-dev" -VERSION="3.1.0" +VERSION="3.1.2" CATEGORY="development" SHORT_DESC="GNU Multiple Precision Arithmetic devel files." MAINTAINER="pankso@slitaz.org" LICENSE="GPL3" WANTED="mpfr" -WEB_SITE="http://gmplib.org/" -#EXTRAVERSION="p8" +WEB_SITE="http://www.mpfr.org/" +HOST_ARCH="i486 arm" DEPENDS="mpfr" diff -r 03d5ff1ebd83 -r 3a1e8d25c320 mpfr/receipt --- a/mpfr/receipt Wed Apr 09 15:40:42 2014 +0200 +++ b/mpfr/receipt Wed Apr 09 20:51:15 2014 +0200 @@ -1,7 +1,7 @@ # SliTaz package receipt PACKAGE="mpfr" -VERSION="3.1.0" +VERSION="3.1.2" CATEGORY="development" SHORT_DESC="C library for multiple-precision floating-point computations." MAINTAINER="pankso@slitaz.org" @@ -9,16 +9,19 @@ TARBALL="$PACKAGE-$VERSION.tar.bz2" WEB_SITE="http://www.mpfr.org/" WGET_URL="http://www.mpfr.org/mpfr-current/$TARBALL" +HOST_ARCH="i486 arm" DEPENDS="gmp" BUILD_DEPENDS="gmp-dev" +#--with-gmp-lib=/cross/$ARCH/sysroot/usr/lib +#--with-gmp-include=/cross/$ARCH/sysroot/usr/include + # Rules to configure and make the package. compile_rules() -{ - cd $src - patch -Np1 -i $stuff/$PACKAGE-$VERSION.patch - ./configure $CONFIGURE_ARGS && +{ + ./configure \ + $CONFIGURE_ARGS && make && make install }