summaryrefslogtreecommitdiff
path: root/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD
blob: 2a9f13e2593147d906bc2370dce7f509a83f1ee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 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"
_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-${_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() {
    export PATH=${_sysroot}/bin:$PATH

  cd ${srcdir}
  mkdir gcc-build && cd gcc-build

  CC_FOR_BUILD=${CHOST}-gcc \
  CFLAGS=" -pipe " \
  LDFLAGS= \
	${srcdir}/${_pkgname}-${pkgver}/configure \
        --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 ${MAKEFLAGS} all-gcc
}

package() {
	#cd ${srcdir}/${_pkgname}-build
	cd ${srcdir}
	
	make ${MAKEFLAGS} DESTDIR=${pkgdir} install-gcc

    rm -r ${pkgdir}/usr/share
}