From 76480b6b18868754fc95ff41d02885898c54367f Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Tue, 17 Apr 2012 20:37:01 -0300 Subject: Updating the cross toolchain for mips64el Added patches from upstream and diff'ed with them. Binutils and linux-libre-api-headers are already built. GCC Core builts but `mips64el-unknown-linux-gnu-gcc -v dummy.c` fails because of missing -EL on i686-pc-linux-gnu-as. Exporting mips64el-...-binutils to the PATH solves the problem but mips64el-...-ld fails with missing crt*. No idea why target gcc decides to use the host as instead of the target one, since the PKGBUILD hasn't fundamentally changed. --- .../PKGBUILD | 100 ++++++++++++++------- 1 file changed, 66 insertions(+), 34 deletions(-) (limited to 'cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD') diff --git a/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD index 47ef81fe1..b94027442 100644 --- a/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD +++ b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD @@ -10,54 +10,81 @@ _ARCH=mips unset LDFLAGS CFLAGS CXXFLAGS pkgname=cross-${_target}-gcc-core -pkgver=4.6.2 -pkgrel=8 +pkgver=4.7.0 +pkgrel=4.3 +_snapshot=4.7-20120407 +_libstdcppmanver=20120307 # Note: check source directory name when updating this pkgdesc="The GNU Compiler Collection for the MIPS/Loongson2f architecture (static version)" url="http://www.gnu.org/software/binutils/" arch=('i686' 'x86_64') license=('GPL') depends=('libmpc' 'sh' "${_target}-binutils" 'cloog' 'ppl') options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip') -source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-${pkgver}.tar.bz2") -md5sums=('028115c4fbfb6cfd75d6369f4a90d87e') +source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2 + gcc_pure64.patch + gcc_mips64el_lib.patch + gcc-4.7.0-cloog-0.17.patch) +md5sums=('e44a8484687ef52c02066d6434ecf42b' + '489d2f5311535800a120efd8d18db719' + 'ced48436c1b3c981d721a829f1094de1' + '474b8f5a7dee6ddd96b95a7240bfb961' + '575f7d17b022e609447a590e481b18b5') + +if [ -n "${_snapshot}" ]; then + _basedir="${srcdir}/gcc-${_snapshot}" +else + _basedir="${srcdir}/gcc-${pkgver}" +fi build() { + cd ${_basedir} + + # Do not install libiberty + sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in + + # Do not run fixincludes + sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + # compatibility with latest cloog + patch -p1 -i ${srcdir}/gcc-4.7.0-cloog-0.17.patch + + echo ${pkgver} > gcc/BASE-VER + cd ${srcdir} mkdir gcc-build && cd gcc-build + #AS=${_target}-as \ + LDFLAGS= \ CC_FOR_BUILD=${CHOST}-gcc \ CFLAGS=" -pipe " \ - LDFLAGS= \ - ${srcdir}/${_pkgname}-${pkgver}/configure \ - --build=${CHOST} \ - --host=${CHOST} \ - --target=${_target} \ - --prefix=/usr \ - --with-local-prefix=${_sysroot} \ - --disable-multilib \ - --disable-libmudflap \ - --with-sysroot=${_sysroot} \ - --with-newlib \ - --enable-threads=no \ - --disable-shared \ - --with-arch=loongson2f \ - --with-abi=n32 \ - --enable-__cxa_atexit \ - --with-gmp \ - --with-mpfr \ - --with-mpc \ - --with-ppl \ - --enable-cloog-backend=isl \ - --enable-lto \ - --enable-target-optspace \ - --disable-libgomp \ - --disable-libmudflap \ - --disable-nls \ - --enable-languages=c \ - --with-libs \ - --with-headers + ${_basedir}/configure --prefix=/usr \ + --with-linker-hash-style=gnu \ + --build=${CHOST} --host=${CHOST} --target=${_target} \ + --with-sysroot=${_sysroot} --with-arch=loongson2f --with-abi=n32 \ + --with-libs --with-headers \ + --with-local-prefix=${_sysroot} \ + --disable-multilib \ + --disable-libmudflap \ + --with-newlib \ + --enable-threads=no \ + --disable-shared \ + --enable-__cxa_atexit \ + --with-gmp \ + --with-mpfr \ + --with-mpc \ + --with-ppl \ + --enable-cloog-backend=isl \ + --enable-lto \ + --enable-target-optspace \ + --disable-libgomp \ + --disable-libmudflap \ + --disable-nls \ + --enable-languages=c + + make all-gcc - make ${MAKEFLAGS} all-gcc } package() { @@ -67,3 +94,8 @@ package() { rm -r ${pkgdir}/usr/share } +md5sums=('e44a8484687ef52c02066d6434ecf42b' + '489d2f5311535800a120efd8d18db719' + 'ced48436c1b3c981d721a829f1094de1' + '474b8f5a7dee6ddd96b95a7240bfb961' + '575f7d17b022e609447a590e481b18b5') -- cgit v1.2.3