| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.5.1-r1.ebuild,v 1.7 2011/11/09 19:22:57 vapier Exp $
|
| 4 |
|
| 5 |
PATCH_VER="1.5"
|
| 6 |
UCLIBC_VER="1.0"
|
| 7 |
|
| 8 |
# Hardened gcc 4 stuff
|
| 9 |
PIE_VER="0.4.5"
|
| 10 |
SPECS_VER="0.2.0"
|
| 11 |
SPECS_GCC_VER="4.4.3"
|
| 12 |
# arch/libc configurations known to be stable with {PIE,SSP}-by-default
|
| 13 |
PIE_GLIBC_STABLE="x86 amd64 ppc ppc64 arm ia64"
|
| 14 |
PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64"
|
| 15 |
SSP_STABLE="amd64 x86 ppc ppc64 arm"
|
| 16 |
# uclibc need tls and nptl support for SSP support
|
| 17 |
SSP_UCLIBC_STABLE=""
|
| 18 |
#end Hardened stuff
|
| 19 |
|
| 20 |
inherit toolchain
|
| 21 |
|
| 22 |
DESCRIPTION="The GNU Compiler Collection"
|
| 23 |
|
| 24 |
LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2"
|
| 25 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
|
| 26 |
|
| 27 |
RDEPEND=""
|
| 28 |
DEPEND="${RDEPEND}
|
| 29 |
elibc_glibc? ( >=sys-libs/glibc-2.8 )
|
| 30 |
amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) )
|
| 31 |
ppc? ( >=${CATEGORY}/binutils-2.17 )
|
| 32 |
ppc64? ( >=${CATEGORY}/binutils-2.17 )
|
| 33 |
>=${CATEGORY}/binutils-2.15.94"
|
| 34 |
if [[ ${CATEGORY} != cross-* ]] ; then
|
| 35 |
PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )"
|
| 36 |
fi
|
| 37 |
|
| 38 |
src_unpack() {
|
| 39 |
toolchain_src_unpack
|
| 40 |
|
| 41 |
use vanilla && return 0
|
| 42 |
|
| 43 |
sed -i 's/use_fixproto=yes/:/' gcc/config.gcc #PR33200
|
| 44 |
|
| 45 |
[[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch
|
| 46 |
|
| 47 |
[[ ${CTARGET} == *-softfloat-* ]] && epatch "${FILESDIR}"/4.4.0/gcc-4.4.0-softfloat.patch
|
| 48 |
}
|
| 49 |
|
| 50 |
pkg_setup() {
|
| 51 |
toolchain_pkg_setup
|
| 52 |
|
| 53 |
if use lto ; then
|
| 54 |
ewarn
|
| 55 |
ewarn "LTO support is still experimental and unstable."
|
| 56 |
ewarn "Any bugs resulting from the use of LTO will not be fixed."
|
| 57 |
ewarn
|
| 58 |
fi
|
| 59 |
}
|