1 |
commit: af41b850d0408ef9cd25b1a8b56175b8a704d708 |
2 |
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 5 23:39:53 2012 +0000 |
4 |
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 5 23:39:53 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=af41b850 |
7 |
|
8 |
Added gcc-4.6.3 for testing of the piepatch |
9 |
|
10 |
--- |
11 |
sys-devel/gcc/gcc-4.6.3.ebuild | 64 ++++++++++++++++++++++++++++++++++++++++ |
12 |
1 files changed, 64 insertions(+), 0 deletions(-) |
13 |
|
14 |
diff --git a/sys-devel/gcc/gcc-4.6.3.ebuild b/sys-devel/gcc/gcc-4.6.3.ebuild |
15 |
new file mode 100644 |
16 |
index 0000000..54bb333 |
17 |
--- /dev/null |
18 |
+++ b/sys-devel/gcc/gcc-4.6.3.ebuild |
19 |
@@ -0,0 +1,64 @@ |
20 |
+# Copyright 1999-2012 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.6.2.ebuild,v 1.9 2012/03/15 20:21:44 vapier Exp $ |
23 |
+ |
24 |
+PATCH_VER="1.0" |
25 |
+UCLIBC_VER="1.0" |
26 |
+ |
27 |
+# Hardened gcc 4 stuff |
28 |
+PIE_VER="0.5.1" |
29 |
+SPECS_VER="0.2.0" |
30 |
+SPECS_GCC_VER="4.4.3" |
31 |
+# arch/libc configurations known to be stable with {PIE,SSP}-by-default |
32 |
+PIE_GLIBC_STABLE="x86 amd64 ppc ppc64 arm ia64" |
33 |
+PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64" |
34 |
+SSP_STABLE="amd64 x86 ppc ppc64 arm" |
35 |
+# uclibc need tls and nptl support for SSP support |
36 |
+# uclibc >= 0.9.32 |
37 |
+SSP_UCLIBC_STABLE="amd64 x86" |
38 |
+#end Hardened stuff |
39 |
+ |
40 |
+inherit toolchain |
41 |
+ |
42 |
+DESCRIPTION="The GNU Compiler Collection" |
43 |
+ |
44 |
+LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2" |
45 |
+KEYWORDS="" |
46 |
+ |
47 |
+RDEPEND="" |
48 |
+DEPEND="${RDEPEND} |
49 |
+ elibc_glibc? ( >=sys-libs/glibc-2.8 ) |
50 |
+ amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) ) |
51 |
+ >=${CATEGORY}/binutils-2.18" |
52 |
+ |
53 |
+if [[ ${CATEGORY} != cross-* ]] ; then |
54 |
+ PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )" |
55 |
+fi |
56 |
+ |
57 |
+src_unpack() { |
58 |
+ if has_version '<sys-libs/glibc-2.12' ; then |
59 |
+ ewarn "Your host glibc is too old; disabling automatic fortify." |
60 |
+ ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315" |
61 |
+ EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch" |
62 |
+ fi |
63 |
+ |
64 |
+ # drop the x32 stuff once 4.7 goes stable |
65 |
+ case ${CHOST} in |
66 |
+ x86_64*) has x32 $(get_all_abis) || EPATCH_EXCLUDE+=" 80_all_gcc-4.6-x32.patch" ;; |
67 |
+ esac |
68 |
+ |
69 |
+ toolchain_src_unpack |
70 |
+ |
71 |
+ use vanilla && return 0 |
72 |
+ |
73 |
+ [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch |
74 |
+} |
75 |
+ |
76 |
+pkg_setup() { |
77 |
+ toolchain_pkg_setup |
78 |
+ |
79 |
+ ewarn |
80 |
+ ewarn "LTO support is still experimental and unstable." |
81 |
+ ewarn "Any bugs resulting from the use of LTO will not be fixed." |
82 |
+ ewarn |
83 |
+} |