1 |
vapier 13/05/21 20:44:00 |
2 |
|
3 |
Modified: toolchain.eclass |
4 |
Log: |
5 |
convert confgcc to an array to avoid overloading $@ and to clean things up a bit -- hopefully no real functional changes here |
6 |
|
7 |
Revision Changes Path |
8 |
1.591 eclass/toolchain.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.591&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.591&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.590&r2=1.591 |
13 |
|
14 |
Index: toolchain.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v |
17 |
retrieving revision 1.590 |
18 |
retrieving revision 1.591 |
19 |
diff -u -r1.590 -r1.591 |
20 |
--- toolchain.eclass 15 May 2013 05:42:09 -0000 1.590 |
21 |
+++ toolchain.eclass 21 May 2013 20:44:00 -0000 1.591 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2013 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.590 2013/05/15 05:42:09 dirtyepic Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.591 2013/05/21 20:44:00 vapier Exp $ |
27 |
# |
28 |
# Maintainer: Toolchain Ninjas <toolchain@g.o> |
29 |
|
30 |
@@ -836,13 +836,13 @@ |
31 |
|
32 |
gcc-multilib-configure() { |
33 |
if ! is_multilib ; then |
34 |
- confgcc+=" --disable-multilib" |
35 |
+ confgcc+=( --disable-multilib ) |
36 |
# Fun times: if we are building for a target that has multiple |
37 |
# possible ABI formats, and the user has told us to pick one |
38 |
# that isn't the default, then not specifying it via the list |
39 |
# below will break that on us. |
40 |
else |
41 |
- confgcc+=" --enable-multilib" |
42 |
+ confgcc+=( --enable-multilib ) |
43 |
fi |
44 |
|
45 |
# translate our notion of multilibs into gcc's |
46 |
@@ -854,7 +854,7 @@ |
47 |
if [[ -n ${list} ]] ; then |
48 |
case ${CTARGET} in |
49 |
x86_64*) |
50 |
- tc_version_is_at_least 4.7 && confgcc+=" --with-multilib-list=${list:1}" |
51 |
+ tc_version_is_at_least 4.7 && confgcc+=( --with-multilib-list=${list:1} ) |
52 |
;; |
53 |
esac |
54 |
fi |
55 |
@@ -865,21 +865,21 @@ |
56 |
|
57 |
if tc_version_is_at_least "4.0" ; then |
58 |
if in_iuse mudflap ; then |
59 |
- confgcc+=" $(use_enable mudflap libmudflap)" |
60 |
+ confgcc+=( $(use_enable mudflap libmudflap) ) |
61 |
else |
62 |
- confgcc+=" --disable-libmudflap" |
63 |
+ confgcc+=( --disable-libmudflap ) |
64 |
fi |
65 |
|
66 |
if use_if_iuse libssp ; then |
67 |
- confgcc+=" --enable-libssp" |
68 |
+ confgcc+=( --enable-libssp ) |
69 |
else |
70 |
export gcc_cv_libc_provides_ssp=yes |
71 |
- confgcc+=" --disable-libssp" |
72 |
+ confgcc+=( --disable-libssp ) |
73 |
fi |
74 |
|
75 |
# If we want hardened support with the newer piepatchset for >=gcc 4.4 |
76 |
if tc_version_is_at_least 4.4 && want_minispecs ; then |
77 |
- confgcc+=" $(use_enable hardened esp)" |
78 |
+ confgcc+=( $(use_enable hardened esp) ) |
79 |
fi |
80 |
|
81 |
if tc_version_is_at_least "4.2" ; then |
82 |
@@ -891,14 +891,14 @@ |
83 |
if ! is_crosscompile || \ |
84 |
$(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null |
85 |
then |
86 |
- confgcc+=" $(use_enable openmp libgomp)" |
87 |
+ confgcc+=( $(use_enable openmp libgomp) ) |
88 |
else |
89 |
# Force disable as the configure script can be dumb #359855 |
90 |
- confgcc+=" --disable-libgomp" |
91 |
+ confgcc+=( --disable-libgomp ) |
92 |
fi |
93 |
else |
94 |
# For gcc variants where we don't want openmp (e.g. kgcc) |
95 |
- confgcc+=" --disable-libgomp" |
96 |
+ confgcc+=( --disable-libgomp ) |
97 |
fi |
98 |
fi |
99 |
|
100 |
@@ -913,48 +913,48 @@ |
101 |
# |
102 |
# This should translate into "/share/gcc-data/${CTARGET}/${GCC_CONFIG_VER}/python" |
103 |
if tc_version_is_at_least "4.4" ; then |
104 |
- confgcc+=" --with-python-dir=${DATAPATH/$PREFIX/}/python" |
105 |
+ confgcc+=( --with-python-dir=${DATAPATH/$PREFIX/}/python ) |
106 |
fi |
107 |
fi |
108 |
|
109 |
# Enable build warnings by default with cross-compilers when system |
110 |
# paths are included (e.g. via -I flags). |
111 |
- is_crosscompile && confgcc+=" --enable-poison-system-directories" |
112 |
+ is_crosscompile && confgcc+=( --enable-poison-system-directories ) |
113 |
|
114 |
# For newer versions of gcc, use the default ("release"), because no |
115 |
# one (even upstream apparently) tests with it disabled. #317217 |
116 |
if tc_version_is_at_least 4 || [[ -n ${GCC_CHECKS_LIST} ]] ; then |
117 |
- confgcc+=" --enable-checking=${GCC_CHECKS_LIST:-release}" |
118 |
+ confgcc+=( --enable-checking=${GCC_CHECKS_LIST:-release} ) |
119 |
else |
120 |
- confgcc+=" --disable-checking" |
121 |
+ confgcc+=( --disable-checking ) |
122 |
fi |
123 |
|
124 |
# GTK+ is preferred over xlib in 3.4.x (xlib is unmaintained |
125 |
# right now). Much thanks to <csm@×××.org> for the heads up. |
126 |
# Travis Tilley <lv@g.o> (11 Jul 2004) |
127 |
if ! is_gcj ; then |
128 |
- confgcc+=" --disable-libgcj" |
129 |
+ confgcc+=( --disable-libgcj ) |
130 |
elif use gtk ; then |
131 |
- confgcc+=" --enable-java-awt=gtk" |
132 |
+ confgcc+=( --enable-java-awt=gtk ) |
133 |
fi |
134 |
|
135 |
# allow gcc to search for clock funcs in the main C lib. |
136 |
# if it can't find them, then tough cookies -- we aren't |
137 |
# going to link in -lrt to all C++ apps. #411681 |
138 |
if tc_version_is_at_least 4.4 && is_cxx ; then |
139 |
- confgcc+=" --enable-libstdcxx-time" |
140 |
+ confgcc+=( --enable-libstdcxx-time ) |
141 |
fi |
142 |
|
143 |
# newer gcc versions like to bootstrap themselves with C++, |
144 |
# so we need to manually disable it ourselves |
145 |
if tc_version_is_at_least 4.7 && ! is_cxx ; then |
146 |
- confgcc+=" --disable-build-with-cxx --disable-build-poststage1-with-cxx" |
147 |
+ confgcc+=( --disable-build-with-cxx --disable-build-poststage1-with-cxx ) |
148 |
fi |
149 |
|
150 |
# newer gcc's come with libquadmath, but only fortran uses |
151 |
# it, so auto punt it when we don't care |
152 |
if tc_version_is_at_least 4.6 && ! is_fortran ; then |
153 |
- confgcc+=" --disable-libquadmath" |
154 |
+ confgcc+=( --disable-libquadmath ) |
155 |
fi |
156 |
|
157 |
local with_abi_map=() |
158 |
@@ -974,7 +974,7 @@ |
159 |
if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch}; |
160 |
. "${srcdir}"/config.gcc) &>/dev/null |
161 |
then |
162 |
- confgcc+=" --with-arch=${arm_arch}" |
163 |
+ confgcc+=( --with-arch=${arm_arch} ) |
164 |
fi |
165 |
|
166 |
# Enable hardvfp |
167 |
@@ -983,37 +983,37 @@ |
168 |
tc_version_is_at_least "4.5" |
169 |
then |
170 |
# Follow the new arm hardfp distro standard by default |
171 |
- confgcc+=" --with-float=hard" |
172 |
+ confgcc+=( --with-float=hard ) |
173 |
case ${CTARGET} in |
174 |
- armv6*) confgcc+=" --with-fpu=vfp" ;; |
175 |
- armv7*) confgcc+=" --with-fpu=vfpv3-d16" ;; |
176 |
+ armv6*) confgcc+=( --with-fpu=vfp ) ;; |
177 |
+ armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;; |
178 |
esac |
179 |
fi |
180 |
;; |
181 |
# Add --with-abi flags to set default ABI |
182 |
mips) |
183 |
- confgcc+=" --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI})" |
184 |
+ confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) ) |
185 |
;; |
186 |
amd64) |
187 |
# drop the older/ABI checks once this get's merged into some |
188 |
# version of gcc upstream |
189 |
if tc_version_is_at_least 4.7 && has x32 $(get_all_abis TARGET) ; then |
190 |
- confgcc+=" --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI})" |
191 |
+ confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) ) |
192 |
fi |
193 |
;; |
194 |
# Default arch for x86 is normally i386, lets give it a bump |
195 |
# since glibc will do so based on CTARGET anyways |
196 |
x86) |
197 |
- confgcc+=" --with-arch=${CTARGET%%-*}" |
198 |
+ confgcc+=( --with-arch=${CTARGET%%-*} ) |
199 |
;; |
200 |
# Enable sjlj exceptions for backward compatibility on hppa |
201 |
hppa) |
202 |
- [[ ${GCCMAJOR} == "3" ]] && confgcc+=" --enable-sjlj-exceptions" |
203 |
+ [[ ${GCCMAJOR} == "3" ]] && confgcc+=( --enable-sjlj-exceptions ) |
204 |
;; |
205 |
# Set up defaults based on current CFLAGS |
206 |
ppc) |
207 |
- is-flagq -mfloat-gprs=double && confgcc+=" --enable-e500-double" |
208 |
- [[ ${CTARGET//_/-} == *-e500v2-* ]] && confgcc+=" --enable-e500-double" |
209 |
+ is-flagq -mfloat-gprs=double && confgcc+=( --enable-e500-double ) |
210 |
+ [[ ${CTARGET//_/-} == *-e500v2-* ]] && confgcc+=( --enable-e500-double ) |
211 |
;; |
212 |
esac |
213 |
|
214 |
@@ -1025,7 +1025,7 @@ |
215 |
if is_objc || is_objcxx ; then |
216 |
GCC_LANG+=",objc" |
217 |
if tc_version_is_at_least "4.0" ; then |
218 |
- use objc-gc && confgcc+=" --enable-objc-gc" |
219 |
+ use objc-gc && confgcc+=( --enable-objc-gc ) |
220 |
fi |
221 |
is_objcxx && GCC_LANG+=",obj-c++" |
222 |
fi |
223 |
@@ -1042,94 +1042,94 @@ |
224 |
# is_ada && GCC_LANG+=",ada" |
225 |
|
226 |
einfo "configuring for GCC_LANG: ${GCC_LANG}" |
227 |
- confgcc+=" --enable-languages=${GCC_LANG}" |
228 |
+ confgcc+=( --enable-languages=${GCC_LANG} ) |
229 |
} |
230 |
|
231 |
gcc_do_configure() { |
232 |
- local confgcc |
233 |
- |
234 |
- # Set configuration based on path variables |
235 |
- confgcc+=" \ |
236 |
- --prefix=${PREFIX} \ |
237 |
- --bindir=${BINPATH} \ |
238 |
- --includedir=${INCLUDEPATH} \ |
239 |
- --datadir=${DATAPATH} \ |
240 |
- --mandir=${DATAPATH}/man \ |
241 |
- --infodir=${DATAPATH}/info \ |
242 |
- --with-gxx-include-dir=${STDCXX_INCDIR}" |
243 |
+ local confgcc=( |
244 |
+ # Set configuration based on path variables |
245 |
+ --prefix="${PREFIX}" |
246 |
+ --bindir="${BINPATH}" |
247 |
+ --includedir="${INCLUDEPATH}" |
248 |
+ --datadir="${DATAPATH}" |
249 |
+ --mandir="${DATAPATH}/man" |
250 |
+ --infodir="${DATAPATH}/info" |
251 |
+ --with-gxx-include-dir="${STDCXX_INCDIR}" |
252 |
+ ) |
253 |
# On Darwin we need libdir to be set in order to get correct install names |
254 |
# for things like libobjc-gnu, libgcj and libfortran. If we enable it on |
255 |
# non-Darwin we screw up the behaviour this eclass relies on. We in |
256 |
# particular need this over --libdir for bug #255315. |
257 |
[[ ${CTARGET} == *-darwin* ]] && \ |
258 |
- confgcc+=" --enable-version-specific-runtime-libs" |
259 |
+ confgcc+=( --enable-version-specific-runtime-libs ) |
260 |
|
261 |
# All our cross-compile logic goes here ! woo ! |
262 |
- confgcc+=" --host=${CHOST}" |
263 |
+ confgcc+=( --host=${CHOST} ) |
264 |
if is_crosscompile || tc-is-cross-compiler ; then |
265 |
# Straight from the GCC install doc: |
266 |
# "GCC has code to correctly determine the correct value for target |
267 |
# for nearly all native systems. Therefore, we highly recommend you |
268 |
# not provide a configure target when configuring a native compiler." |
269 |
- confgcc+=" --target=${CTARGET}" |
270 |
+ confgcc+=( --target=${CTARGET} ) |
271 |
fi |
272 |
- [[ -n ${CBUILD} ]] && confgcc+=" --build=${CBUILD}" |
273 |
+ [[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} ) |
274 |
|
275 |
# ppc altivec support |
276 |
- confgcc+=" $(use_enable altivec)" |
277 |
+ confgcc+=( $(use_enable altivec) ) |
278 |
|
279 |
# gcc has fixed-point arithmetic support in 4.3 for mips targets that can |
280 |
# significantly increase compile time by several hours. This will allow |
281 |
# users to control this feature in the event they need the support. |
282 |
- tc_version_is_at_least "4.3" && confgcc+=" $(use_enable fixed-point)" |
283 |
+ tc_version_is_at_least "4.3" && confgcc+=( $(use_enable fixed-point) ) |
284 |
|
285 |
# graphite was added in 4.4 but we only support it in 4.6+ due to external |
286 |
# library issues. 4.6/4.7 uses cloog-ppl which is a fork of CLooG with a |
287 |
# PPL backend. 4.8+ uses upstream CLooG with the ISL backend. We install |
288 |
# cloog-ppl into a non-standard location to prevent collisions. |
289 |
if tc_version_is_at_least "4.8" ; then |
290 |
- confgcc+=" $(use_with graphite cloog)" |
291 |
- use graphite && confgcc+=" --disable-isl-version-check" |
292 |
+ confgcc+=( $(use_with graphite cloog) ) |
293 |
+ use graphite && confgcc+=( --disable-isl-version-check ) |
294 |
elif tc_version_is_at_least "4.6" ; then |
295 |
- confgcc+=" $(use_with graphite cloog)" |
296 |
- confgcc+=" $(use_with graphite ppl)" |
297 |
- use graphite && confgcc+=" --with-cloog-include=/usr/include/cloog-ppl" |
298 |
- use graphite && confgcc+=" --disable-ppl-version-check" |
299 |
+ confgcc+=( $(use_with graphite cloog) ) |
300 |
+ confgcc+=( $(use_with graphite ppl) ) |
301 |
+ use graphite && confgcc+=( --with-cloog-include=/usr/include/cloog-ppl ) |
302 |
+ use graphite && confgcc+=( --disable-ppl-version-check ) |
303 |
elif tc_version_is_at_least "4.4" ; then |
304 |
- confgcc+=" --without-cloog" |
305 |
- confgcc+=" --without-ppl" |
306 |
+ confgcc+=( --without-cloog ) |
307 |
+ confgcc+=( --without-ppl ) |
308 |
fi |
309 |
|
310 |
if tc_version_is_at_least "4.6" ; then |
311 |
- confgcc+=" $(use_enable lto)" |
312 |
+ confgcc+=( $(use_enable lto) ) |
313 |
elif tc_version_is_at_least "4.5" ; then |
314 |
- confgcc+=" --disable-lto" |
315 |
+ confgcc+=( --disable-lto ) |
316 |
fi |
317 |
|
318 |
case $(tc-is-softfloat) in |
319 |
- yes) confgcc+=" --with-float=soft" ;; |
320 |
- softfp) confgcc+=" --with-float=softfp" ;; |
321 |
+ yes) confgcc+=( --with-float=soft ) ;; |
322 |
+ softfp) confgcc+=( --with-float=softfp ) ;; |
323 |
*) |
324 |
# If they've explicitly opt-ed in, do hardfloat, |
325 |
# otherwise let the gcc default kick in. |
326 |
[[ ${CTARGET//_/-} == *-hardfloat-* ]] \ |
327 |
- && confgcc+=" --with-float=hard" |
328 |
+ && confgcc+=( --with-float=hard ) |
329 |
;; |
330 |
esac |
331 |
|
332 |
# Native Language Support |
333 |
if use nls ; then |
334 |
- confgcc+=" --enable-nls --without-included-gettext" |
335 |
+ confgcc+=( --enable-nls --without-included-gettext ) |
336 |
else |
337 |
- confgcc+=" --disable-nls" |
338 |
+ confgcc+=( --disable-nls ) |
339 |
fi |
340 |
|
341 |
# reasonably sane globals (hopefully) |
342 |
- confgcc+=" \ |
343 |
- --with-system-zlib \ |
344 |
- --enable-obsolete \ |
345 |
- --disable-werror \ |
346 |
- --enable-secureplt" |
347 |
+ confgcc+=( |
348 |
+ --with-system-zlib |
349 |
+ --enable-obsolete |
350 |
+ --disable-werror |
351 |
+ --enable-secureplt |
352 |
+ ) |
353 |
|
354 |
gcc-compiler-configure || die |
355 |
|
356 |
@@ -1149,7 +1149,7 @@ |
357 |
$(tc-getCPP ${CTARGET}) -E -dD - 2>/dev/null | \ |
358 |
grep -q __HAVE_SHARED__ |
359 |
then #291870 |
360 |
- confgcc+=" --disable-shared" |
361 |
+ confgcc+=( --disable-shared ) |
362 |
fi |
363 |
needed_libc=uclibc |
364 |
;; |
365 |
@@ -1157,73 +1157,89 @@ |
366 |
x86_64-*-mingw*|\ |
367 |
*-w64-mingw*) needed_libc=mingw64-runtime;; |
368 |
mingw*|*-mingw*) needed_libc=mingw-runtime;; |
369 |
- avr) confgcc+=" --enable-shared --disable-threads";; |
370 |
+ avr) confgcc+=( --enable-shared --disable-threads );; |
371 |
esac |
372 |
if [[ -n ${needed_libc} ]] ; then |
373 |
- local confgcc_no_libc="--disable-shared" |
374 |
- tc_version_is_at_least 4.8 && confgcc_no_libc+=" --disable-libatomic" |
375 |
+ local confgcc_no_libc=( --disable-shared ) |
376 |
+ tc_version_is_at_least 4.8 && confgcc_no_libc+=( --disable-libatomic ) |
377 |
if ! has_version ${CATEGORY}/${needed_libc} ; then |
378 |
- confgcc+=" ${confgcc_no_libc} --disable-threads --without-headers" |
379 |
+ confgcc+=( |
380 |
+ "${confgcc_no_libc[@]}" |
381 |
+ --disable-threads |
382 |
+ --without-headers |
383 |
+ ) |
384 |
elif built_with_use --hidden --missing false ${CATEGORY}/${needed_libc} crosscompile_opts_headers-only ; then |
385 |
- confgcc+=" ${confgcc_no_libc} --with-sysroot=${PREFIX}/${CTARGET}" |
386 |
+ confgcc+=( |
387 |
+ "${confgcc_no_libc[@]}" |
388 |
+ --with-sysroot=${PREFIX}/${CTARGET} |
389 |
+ ) |
390 |
else |
391 |
- confgcc+=" --with-sysroot=${PREFIX}/${CTARGET}" |
392 |
+ confgcc+=( --with-sysroot=${PREFIX}/${CTARGET} ) |
393 |
fi |
394 |
fi |
395 |
|
396 |
- tc_version_is_at_least 4.2 && confgcc+=" --disable-bootstrap" |
397 |
+ tc_version_is_at_least 4.2 && confgcc+=( --disable-bootstrap ) |
398 |
else |
399 |
if tc-is-static-only ; then |
400 |
- confgcc+=" --disable-shared" |
401 |
+ confgcc+=( --disable-shared ) |
402 |
else |
403 |
- confgcc+=" --enable-shared" |
404 |
+ confgcc+=( --enable-shared ) |
405 |
fi |
406 |
case ${CHOST} in |
407 |
mingw*|*-mingw*|*-cygwin) |
408 |
- confgcc+=" --enable-threads=win32" ;; |
409 |
+ confgcc+=( --enable-threads=win32 ) ;; |
410 |
*) |
411 |
- confgcc+=" --enable-threads=posix" ;; |
412 |
+ confgcc+=( --enable-threads=posix ) ;; |
413 |
esac |
414 |
fi |
415 |
# __cxa_atexit is "essential for fully standards-compliant handling of |
416 |
# destructors", but apparently requires glibc. |
417 |
case ${CTARGET} in |
418 |
*-uclibc*) |
419 |
- confgcc+=" --disable-__cxa_atexit $(use_enable nptl tls)" |
420 |
- [[ ${GCCMAJOR}.${GCCMINOR} == 3.3 ]] && confgcc+=" --enable-sjlj-exceptions" |
421 |
+ confgcc+=( |
422 |
+ --disable-__cxa_atexit |
423 |
+ $(use_enable nptl tls) |
424 |
+ ) |
425 |
+ [[ ${GCCMAJOR}.${GCCMINOR} == 3.3 ]] && confgcc+=( --enable-sjlj-exceptions ) |
426 |
if tc_version_is_at_least 3.4 && ! tc_version_is_at_least 4.3 ; then |
427 |
- confgcc+=" --enable-clocale=uclibc" |
428 |
+ confgcc+=( --enable-clocale=uclibc ) |
429 |
fi |
430 |
;; |
431 |
*-elf|*-eabi) |
432 |
- confgcc+=" --with-newlib" |
433 |
+ confgcc+=( --with-newlib ) |
434 |
;; |
435 |
*-gnu*) |
436 |
- confgcc+=" --enable-__cxa_atexit" |
437 |
- confgcc+=" --enable-clocale=gnu" |
438 |
+ confgcc+=( |
439 |
+ --enable-__cxa_atexit |
440 |
+ --enable-clocale=gnu |
441 |
+ ) |
442 |
;; |
443 |
*-freebsd*) |
444 |
- confgcc+=" --enable-__cxa_atexit" |
445 |
+ confgcc+=( --enable-__cxa_atexit ) |
446 |
;; |
447 |
*-solaris*) |
448 |
- confgcc+=" --enable-__cxa_atexit" |
449 |
+ confgcc+=( --enable-__cxa_atexit ) |
450 |
;; |
451 |
esac |
452 |
- tc_version_is_at_least 3.4 || confgcc+=" --disable-libunwind-exceptions" |
453 |
+ tc_version_is_at_least 3.4 || confgcc+=( --disable-libunwind-exceptions ) |
454 |
|
455 |
# if the target can do biarch (-m32/-m64), enable it. overhead should |
456 |
# be small, and should simplify building of 64bit kernels in a 32bit |
457 |
# userland by not needing sys-devel/kgcc64. #349405 |
458 |
case $(tc-arch) in |
459 |
- ppc|ppc64) tc_version_is_at_least 3.4 && confgcc+=" --enable-targets=all" ;; |
460 |
- sparc) tc_version_is_at_least 4.4 && confgcc+=" --enable-targets=all" ;; |
461 |
- amd64|x86) tc_version_is_at_least 4.3 && confgcc+=" --enable-targets=all" ;; |
462 |
+ ppc|ppc64) tc_version_is_at_least 3.4 && confgcc+=( --enable-targets=all ) ;; |
463 |
+ sparc) tc_version_is_at_least 4.4 && confgcc+=( --enable-targets=all ) ;; |
464 |
+ amd64|x86) tc_version_is_at_least 4.3 && confgcc+=( --enable-targets=all ) ;; |
465 |
esac |
466 |
|
467 |
- tc_version_is_at_least 4.3 && set -- "$@" \ |
468 |
- --with-bugurl=http://bugs.gentoo.org/ \ |
469 |
+ tc_version_is_at_least 4.3 && confgcc+=( |
470 |
+ --with-bugurl=http://bugs.gentoo.org/ |
471 |
--with-pkgversion="${BRANDING_GCC_PKGVERSION}" |
472 |
- set -- ${confgcc} "$@" ${EXTRA_ECONF} |
473 |
+ ) |
474 |
+ confgcc+=( |
475 |
+ "$@" |
476 |
+ ${EXTRA_ECONF} |
477 |
+ ) |
478 |
|
479 |
# Disable gcc info regeneration -- it ships with generated info pages |
480 |
# already. Our custom version/urls/etc... trigger it. #464008 |
481 |
@@ -1243,7 +1259,7 @@ |
482 |
einfo "DATAPATH: ${DATAPATH}" |
483 |
einfo "STDCXX_INCDIR: ${STDCXX_INCDIR}" |
484 |
echo |
485 |
- einfo "Configuring GCC with: ${@//--/\n\t--}" |
486 |
+ einfo "Configuring GCC with: ${confgcc[@]//--/\n\t--}" |
487 |
echo |
488 |
|
489 |
# Build in a separate build tree |
490 |
@@ -1252,8 +1268,8 @@ |
491 |
|
492 |
# and now to do the actual configuration |
493 |
addwrite /dev/zero |
494 |
- echo "${S}"/configure "$@" |
495 |
- "${S}"/configure "$@" || die "failed to run configure" |
496 |
+ echo "${S}"/configure "${confgcc[@]}" |
497 |
+ "${S}"/configure "${confgcc[@]}" || die "failed to run configure" |
498 |
|
499 |
# return to whatever directory we were in before |
500 |
popd > /dev/null |