Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: toolchain.eclass
Date: Sat, 03 Dec 2011 02:06:41
Message-Id: 20111203020631.CF8A62004C@flycatcher.gentoo.org
1 vapier 11/12/03 02:06:31
2
3 Modified: toolchain.eclass
4 Log:
5 convert GCCMAJOR/GCCMINOR checking to tc_version_is_at_least when possible
6
7 Revision Changes Path
8 1.487 eclass/toolchain.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.487&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.487&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.486&r2=1.487
13
14 Index: toolchain.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v
17 retrieving revision 1.486
18 retrieving revision 1.487
19 diff -u -r1.486 -r1.487
20 --- toolchain.eclass 3 Dec 2011 01:04:35 -0000 1.486
21 +++ toolchain.eclass 3 Dec 2011 02:06:31 -0000 1.487
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.486 2011/12/03 01:04:35 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.487 2011/12/03 02:06:31 vapier Exp $
27 #
28 # Maintainer: Toolchain Ninjas <toolchain@g.o>
29
30 @@ -942,14 +942,14 @@
31 setup_multilib_osdirnames
32
33 gcc_version_patch
34 - if [[ ${GCCMAJOR}.${GCCMINOR} > 4.0 ]] ; then
35 + if tc_version_is_at_least 4.1 ; then
36 if [[ -n ${SNAPSHOT} || -n ${PRERELEASE} || -n ${GCC_SVN} ]] ; then
37 echo ${PV/_/-} > "${S}"/gcc/BASE-VER
38 fi
39 fi
40
41 # >= gcc-4.3 doesn't bundle ecj.jar, so copy it
42 - if [[ ${GCCMAJOR}.${GCCMINOR} > 4.2 ]] && use gcj ; then
43 + if tc_version_is_at_least 4.3 && use gcj ; then
44 if tc_version_is_at_least "4.5" ; then
45 einfo "Copying ecj-4.5.jar"
46 cp -pPR "${DISTDIR}/ecj-4.5.jar" "${S}/ecj.jar" || die
47 @@ -968,9 +968,7 @@
48
49 # In gcc 3.3.x and 3.4.x, rename the java bins to gcc-specific names
50 # in line with gcc-4.
51 - if [[ ${GCCMAJOR} == 3 ]] &&
52 - [[ ${GCCMINOR} -ge 3 ]]
53 - then
54 + if tc_version_is_at_least 3.3 && ! tc_version_is_at_least 4.0 ; then
55 do_gcc_rename_java_bins
56 fi
57
58 @@ -1318,9 +1316,7 @@
59 fi
60 fi
61
62 - if [[ ${GCCMAJOR}.${GCCMINOR} > 4.1 ]] ; then
63 - confgcc+=" --disable-bootstrap"
64 - fi
65 + tc_version_is_at_least 4.2 && confgcc+=" --disable-bootstrap"
66 else
67 if tc-is-static-only ; then
68 confgcc+=" --disable-shared"
69 @@ -1340,7 +1336,7 @@
70 *-uclibc*)
71 confgcc+=" --disable-__cxa_atexit --enable-target-optspace $(use_enable nptl tls)"
72 [[ ${GCCMAJOR}.${GCCMINOR} == 3.3 ]] && confgcc+=" --enable-sjlj-exceptions"
73 - if tc_version_is_at_least 3.4 && [[ ${GCCMAJOR}.${GCCMINOR} < 4.3 ]] ; then
74 + if tc_version_is_at_least 3.4 && ! tc_version_is_at_least 4.3 ; then
75 confgcc+=" --enable-clocale=uclibc"
76 fi
77 ;;
78 @@ -1358,13 +1354,13 @@
79 confgcc+=" --enable-__cxa_atexit"
80 ;;
81 esac
82 - [[ ${GCCMAJOR}.${GCCMINOR} < 3.4 ]] && confgcc+=" --disable-libunwind-exceptions"
83 + tc_version_is_at_least 3.4 || confgcc+=" --disable-libunwind-exceptions"
84
85 # create a sparc*linux*-{gcc,g++} that can handle -m32 and -m64 (biarch)
86 if [[ ${CTARGET} == sparc*linux* ]] \
87 && is_multilib \
88 && ! is_crosscompile \
89 - && [[ ${GCCMAJOR}.${GCCMINOR} > 4.2 ]]
90 + && tc_version_is_at_least 4.3
91 then
92 confgcc+=" --enable-targets=all"
93 fi
94 @@ -2283,7 +2279,7 @@
95 }
96
97 is_multilib() {
98 - [[ ${GCCMAJOR} < 3 ]] && return 1
99 + tc_version_is_at_least 3 || return 1
100 use multilib
101 }