1 |
vapier 11/09/26 17:32:44 |
2 |
|
3 |
Modified: toolchain.eclass |
4 |
Log: |
5 |
scrub more ETYPE logic |
6 |
|
7 |
Revision Changes Path |
8 |
1.470 eclass/toolchain.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.470&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.470&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.469&r2=1.470 |
13 |
|
14 |
Index: toolchain.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v |
17 |
retrieving revision 1.469 |
18 |
retrieving revision 1.470 |
19 |
diff -u -r1.469 -r1.470 |
20 |
--- toolchain.eclass 22 Sep 2011 23:08:28 -0000 1.469 |
21 |
+++ toolchain.eclass 26 Sep 2011 17:32:44 -0000 1.470 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2011 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.469 2011/09/22 23:08:28 vapier Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.470 2011/09/26 17:32:44 vapier Exp $ |
27 |
# |
28 |
# Maintainer: Toolchain Ninjas <toolchain@g.o> |
29 |
|
30 |
@@ -719,25 +719,21 @@ |
31 |
|
32 |
#---->> pkg_* <<---- |
33 |
toolchain_pkg_setup() { |
34 |
- [[ -z ${ETYPE} ]] && die "Your ebuild needs to set the ETYPE variable" |
35 |
- |
36 |
- if [[ ${ETYPE} == "gcc-compiler" ]] ; then |
37 |
- # Setup variables which would normally be in the profile |
38 |
- if is_crosscompile ; then |
39 |
- multilib_env ${CTARGET} |
40 |
- if ! is_multilib ; then |
41 |
- MULTILIB_ABIS=${DEFAULT_ABI} |
42 |
- fi |
43 |
+ # Setup variables which would normally be in the profile |
44 |
+ if is_crosscompile ; then |
45 |
+ multilib_env ${CTARGET} |
46 |
+ if ! is_multilib ; then |
47 |
+ MULTILIB_ABIS=${DEFAULT_ABI} |
48 |
fi |
49 |
+ fi |
50 |
|
51 |
- # we dont want to use the installed compiler's specs to build gcc! |
52 |
- unset GCC_SPECS |
53 |
+ # we dont want to use the installed compiler's specs to build gcc! |
54 |
+ unset GCC_SPECS |
55 |
|
56 |
- if use nocxx ; then |
57 |
- use go && ewarn 'Go requires a C++ compiler, disabled due to USE="nocxx"' |
58 |
- use objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="nocxx"' |
59 |
- use gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="nocxx"' |
60 |
- fi |
61 |
+ if use nocxx ; then |
62 |
+ use go && ewarn 'Go requires a C++ compiler, disabled due to USE="nocxx"' |
63 |
+ use objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="nocxx"' |
64 |
+ use gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="nocxx"' |
65 |
fi |
66 |
|
67 |
want_libssp && libc_has_ssp && \ |
68 |
@@ -847,36 +843,6 @@ |
69 |
|
70 |
#---->> src_* <<---- |
71 |
|
72 |
-# generic GCC src_unpack, to be called from the ebuild's src_unpack. |
73 |
-# BIG NOTE regarding hardened support: ebuilds with support for hardened are |
74 |
-# expected to export the following variable: |
75 |
-# |
76 |
-# HARDENED_GCC_WORKS |
77 |
-# This variable should be set to the archs on which hardened should |
78 |
-# be allowed. For example: HARDENED_GCC_WORKS="x86 sparc amd64" |
79 |
-# This allows for additional archs to be supported by hardened when |
80 |
-# ready. |
81 |
-# |
82 |
-# Travis Tilley <lv@g.o> (03 Sep 2004) |
83 |
-# |
84 |
-gcc-compiler_src_unpack() { |
85 |
- # fail if using pie patches, building hardened, and glibc doesnt have |
86 |
- # the necessary support |
87 |
- want_pie && use hardened && glibc_have_pie |
88 |
- |
89 |
- if use hardened ; then |
90 |
- einfo "updating configuration to build hardened GCC" |
91 |
- make_gcc_hard || die "failed to make gcc hard" |
92 |
- fi |
93 |
- |
94 |
- if is_libffi ; then |
95 |
- # move the libffi target out of gcj and into all |
96 |
- sed -i \ |
97 |
- -e '/^libgcj=/s:target-libffi::' \ |
98 |
- -e '/^target_lib/s:=":="target-libffi :' \ |
99 |
- "${S}"/configure || die |
100 |
- fi |
101 |
-} |
102 |
guess_patch_type_in_dir() { |
103 |
[[ -n $(ls "$1"/*.bz2 2>/dev/null) ]] \ |
104 |
&& EPATCH_SUFFIX="patch.bz2" \ |
105 |
@@ -944,7 +910,22 @@ |
106 |
do_gcc_PIE_patches |
107 |
epatch_user |
108 |
|
109 |
- ${ETYPE}_src_unpack || die "failed to ${ETYPE}_src_unpack" |
110 |
+ # fail if using pie patches, building hardened, and glibc doesnt have |
111 |
+ # the necessary support |
112 |
+ want_pie && use hardened && glibc_have_pie |
113 |
+ |
114 |
+ if use hardened ; then |
115 |
+ einfo "updating configuration to build hardened GCC" |
116 |
+ make_gcc_hard || die "failed to make gcc hard" |
117 |
+ fi |
118 |
+ |
119 |
+ if is_libffi ; then |
120 |
+ # move the libffi target out of gcj and into all |
121 |
+ sed -i \ |
122 |
+ -e '/^libgcj=/s:target-libffi::' \ |
123 |
+ -e '/^target_lib/s:=":="target-libffi :' \ |
124 |
+ "${S}"/configure || die |
125 |
+ fi |
126 |
|
127 |
# protoize don't build on FreeBSD, skip it |
128 |
## removed in 4.5, bug #270558 --de. |
129 |
@@ -1298,9 +1279,7 @@ |
130 |
--disable-werror \ |
131 |
--enable-secureplt" |
132 |
|
133 |
- # etype specific configuration |
134 |
- einfo "running ${ETYPE}-configure" |
135 |
- ${ETYPE}-configure || die |
136 |
+ gcc-compiler-configure || die |
137 |
|
138 |
# if not specified, assume we are building for a target that only |
139 |
# requires C support |
140 |
@@ -1617,7 +1596,7 @@ |
141 |
|
142 |
# Do not create multiple specs files for PIE+SSP if boundschecking is in |
143 |
# USE, as we disable PIE+SSP when it is. |
144 |
- if [[ ${ETYPE} == "gcc-compiler" ]] && want_split_specs && ! want_minispecs; then |
145 |
+ if want_split_specs && ! want_minispecs; then |
146 |
split_out_specs_files || die "failed to split out specs" |
147 |
fi |