diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-01-14 10:49:22 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-01-14 10:49:22 -0300 |
commit | 6b82531c7cd628b3abbec5cf7b63b5dd41bafa22 (patch) | |
tree | 74ea8a80de3c9acb8a8d71e1fb228873af04ba37 /cross/cross-mips64el-unknown-linux-gnu-gcc-core | |
parent | ebf07becb8601529398326043e0030cc5150f8d2 (diff) |
Work done so far, decided to follow crosstool-ng log
Diffstat (limited to 'cross/cross-mips64el-unknown-linux-gnu-gcc-core')
-rw-r--r-- | cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD new file mode 100644 index 000000000..8075a860b --- /dev/null +++ b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD @@ -0,0 +1,84 @@ +# Contributor: Nicolás Reynolds <fauno@parabola.nu> +# Contributor (mipsel): Vojtech Horky <vojta . horky at-symbol seznam . cz> +# This package is used to bootstrap a cross glibc and full featured cross gcc +# Change the following variables to match your target +_pkgname=gcc +_target="mips64el-unknown-linux-gnu" +_sysroot="/usr/lib/${_target}" +_ARCH=mips + +unset LDFLAGS CFLAGS CXXFLAGS + +pkgname=cross-${_target}-gcc-core +pkgver=4.6.2 +pkgrel=5 +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' "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 + + 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" + + ${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} \ + +# make + make all-gcc "inhibit_libc=true" +} + +package() { + cd ${srcdir}/${_pkgname}-build + + #make -j1 DESTDIR=${pkgdir} install-gcc + make -j1 DESTDIR=${pkgdir} install + + 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 +} |