diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2012-01-10 13:41:02 +0100 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2012-01-10 13:41:02 +0100 |
commit | dae24b9bff18ea229c727ad885e845c9de0b42a3 (patch) | |
tree | 1443afe4a5d9076fc714c59d020fa8a6f5067b9a /cross | |
parent | b7e168f500798ce86b6803d4efad59ade66e7305 (diff) |
Fix some cross gcc problems.
It needs to build libgcc for target, it will fail with x86 CFLAGS.
Similarly, building the cross compiler will fail with mips64el
binutils.
glibc is officially needed to build libgcc, so don't disable using
target headers. libgcc still fails.
Diffstat (limited to 'cross')
-rw-r--r-- | cross/cross-mips64el-unknown-linux-gnu-gcc/PKGBUILD | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/cross/cross-mips64el-unknown-linux-gnu-gcc/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-gcc/PKGBUILD index 7dcc91e95..f860a8c5d 100644 --- a/cross/cross-mips64el-unknown-linux-gnu-gcc/PKGBUILD +++ b/cross/cross-mips64el-unknown-linux-gnu-gcc/PKGBUILD @@ -2,7 +2,6 @@ _pkgname=gcc _target="mips64el-unknown-linux-gnu" _sysroot="/usr/lib/cross-${_target}" -export PATH=${_sysroot}/bin:/usr/bin/cross/${_target}:$PATH pkgname=cross-${_target}-gcc pkgver=4.6.2 @@ -11,16 +10,20 @@ pkgdesc="The GNU Compiler Collection for the MIPS/Loongson2f architecture" url="http://www.gnu.org/software/binutils/" arch=('i686' 'x86_64') license=('GPL') -depends=('libmpc' 'sh' "cross-${_target}-binutils" "cross-${_target}-glibc" 'cloog' 'ppl') +#depends=('libmpc' 'sh' "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') -export PATH=${_sysroot}/bin:/usr/bin/cross/${_target}:$PATH - build() { cd ${srcdir}/${_pkgname}-${pkgver} - + + # -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" + ./configure \ "--prefix=${_sysroot}" \ "--bindir=/usr/bin" "--program-prefix=${_target}-" \ @@ -29,11 +32,10 @@ build() { --enable-shared \ --with-gnu-as --with-gnu-ld \ --disable-nls --disable-threads \ - --enable-languages=c,c++,lto,fortran,objc,obj-c++ \ + --enable-languages=c \ --disable-multilib --disable-libgcj \ - --enable-cloog-backend=isl \ - --without-headers #--disable-shared - + --enable-cloog-backend=isl +# --enable-languages=c,c++,lto,fortran,objc,obj-c++ \ make all # -gcc "inhibit_libc=true" } |