From 1688695d0e71e57427d1b681340b7f3c47fcd5f2 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Sat, 14 Jan 2012 13:01:16 -0300 Subject: cross/cross-mips64el-unknown-linux-gnu-gcc-core-4.6.2-5 --- .../PKGBUILD | 89 ++++++++++------------ 1 file changed, 39 insertions(+), 50 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 8075a860b..2a9f13e25 100644 --- a/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD +++ b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD @@ -4,7 +4,7 @@ # Change the following variables to match your target _pkgname=gcc _target="mips64el-unknown-linux-gnu" -_sysroot="/usr/lib/${_target}" +_sysroot="/usr/lib" _ARCH=mips unset LDFLAGS CFLAGS CXXFLAGS @@ -16,69 +16,58 @@ pkgdesc="The GNU Compiler Collection for the MIPS/Loongson2f architecture (stati url="http://www.gnu.org/software/binutils/" arch=('i686' 'x86_64') license=('GPL') -#depends=('libmpc' 'sh' "cross-mips64el-linux-gnu-gcc-base" "cross-${_target}-binutils" "cross-${_target}-glibc" 'cloog' 'ppl') depends=('libmpc' 'sh' "cross-${_target}-binutils" 'cloog' 'ppl') options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip') source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-core-${pkgver}.tar.bz2") md5sums=('780f614ab18c7a9066dec6387d7490b2') build() { - cd ${srcdir}/${_pkgname}-${pkgver} -# export PATH=${_sysroot}/bin:$PATH -# export LDFLAGS="-static" - - # 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 - - echo ${pkgver} > gcc/BASE-VER + export PATH=${_sysroot}/bin:$PATH cd ${srcdir} mkdir gcc-build && cd gcc-build - # -march=x86-64 and -mtune=generic don't work on mips64el, we - # also want to use -mfix-loongson2f-nop. - export CFLAGS_FOR_TARGET="-O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop" - export CXXFLAGS_FOR_TARGET="-O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop" - + CC_FOR_BUILD=${CHOST}-gcc \ + CFLAGS=" -pipe " \ + LDFLAGS= \ ${srcdir}/${_pkgname}-${pkgver}/configure \ - --target=${_target} --build=$CHOST --host=$CHOST \ - --libdir=/usr/lib --libexecdir=/usr/lib \ - --prefix=/usr \ - --bindir=/usr/bin --program-prefix=${_target}- \ - --enable-languages=c \ - --enable-shared --enable-threads=posix \ - --with-system-zlib --enable-__cxa_atexit \ - --disable-libunwind-exceptions --enable-clocale=gnu \ - --enable-gnu-unique-object --enable-linker-build-id \ - --with-ppl --enable-cloog-backend=isl \ - --enable-lto --enable-gold --enable-ld=default \ - --enable-plugin --with-plugin-ld=ld.gold \ - --disable-multilib --disable-libssp --disable-libstdcxx-pch \ - --enable-checking=release - # --with-newlib \ - #--enable-threads=no \ - #--enable-shared \ - #--disable-multilib \ - #--without-headers - # --with-sysroot=${_sysroot} \ + --build=${CHOST} \ + --host=${CHOST} \ + --target=${_target} \ + --prefix=/usr \ + --libexecdir=/usr/lib \ + --with-local-prefix=${_sysroot} \ + --disable-multilib \ + --disable-libmudflap \ + --with-sysroot=${_sysroot} \ + --with-newlib \ + --enable-threads=no \ + --disable-shared \ + --with-arch=loongson2f \ + --with-abi=n32 \ + --with-tune=loongson2f \ + --enable-__cxa_atexit \ + --with-gmp \ + --with-mpfr \ + --with-mpc \ + --with-ppl \ + --enable-cloog-backend=isl \ + --enable-lto \ + --with-host-libstdcxx="-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -lpwl" \ + --enable-target-optspace \ + --disable-libgomp \ + --disable-libmudflap \ + --disable-nls \ + --enable-languages=c -# make - make all-gcc "inhibit_libc=true" + make ${MAKEFLAGS} all-gcc } package() { - cd ${srcdir}/${_pkgname}-build - - #make -j1 DESTDIR=${pkgdir} install-gcc - make -j1 DESTDIR=${pkgdir} install + #cd ${srcdir}/${_pkgname}-build + cd ${srcdir} - msg "Removing duplicated files..." - # remove these files as they are already in the system - # (with native gcc) - rm -Rf ${pkgdir}/usr/share - # remove conflicting binaries - find ${pkgdir}/usr/bin/ -type f -not -name "${_target}-*" -delete + make ${MAKEFLAGS} DESTDIR=${pkgdir} install-gcc + + rm -r ${pkgdir}/usr/share } -- cgit v1.2.3