summaryrefslogtreecommitdiff
blob: 54f8623c080e593755d9698928649dd59c37c8f6 (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-nios2/gcc-nios2-5.1.ebuild,v 1.3 2006/04/11 00:17:38 vapier Exp $

[[ ${CTARGET} != spu* && ${CATEGORY} == "sys-devel" ]] && export CTARGET="spu"

GCC_A_FAKEIT="toolchain-3.2-src.tar.bz2"
export USE="nocxx -fortran -gcj -objc multilib"

[[ ${CTARGET} == powerpc* ]] && \
	export USE="altivec nocxx -fortran -gcj -objc multilib"

ETYPE="gcc-compiler"

#SPLIT_SPECS=false
TOOLCHAIN_GCC_PV=4.0.2
inherit toolchain eutils

BSC_URI="http://www.bsc.es/projects/deepcomputing/linuxoncell/stable/toolchain"

DESCRIPTION="Compiler for Cell SPU and PPU targets"
SRC_URI="${BSC_URI}/toolchain-3.2-src.tar.bz2
		 ${BSC_URI}/ppu/toolchain-altivec-fix.diff
		 ${BSC_URI}/ppu/toolchain-convertible-revert.diff
		 ${BSC_URI}/ppu/toolchain-libiberty-merge.diff
		 ${BSC_URI}/ppu/toolchain-altivec-cmple-fix.diff
		 ${BSC_URI}/ppu/toolchain-m32-m64-multilib-only.diff
		 ${BSC_URI}/spu/toolchain-build-revert.diff
		 ${BSC_URI}/spu/toolchain-mfcio-stdint.diff"

KEYWORDS="-* ~amd64 ~ppc ~ppc64 ~x86"

DEPEND="=${CATEGORY}/binutils-2.17-r1
		>=sys-devel/patch-2.5.9-r1"

S=${WORKDIR}/toolchain/gcc

src_unpack() {
	local CELL_PATCHES="build-revert convertible-revert libiberty-merge
						altivec-fix altivec-cmple-fix"

	toolchain_src_unpack

	[[ ${CTARGET} == spu* ]] && \
			CELL_PATCHES="${CELL_PATCHES} mfcio-stdint"
	[[ ${CTARGET} == powerpc64* ]] && \
			CELL_PATCHES="${CELL_PATCHES} m32-m64-multilib-only"

	for pt in ${CELL_PATCHES}
	do
		epatch "${DISTDIR}/toolchain-${pt}.diff"
	done
}