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: Tue, 21 May 2013 20:47:48
Message-Id: 20130521204744.DFB382171D@flycatcher.gentoo.org
1 vapier 13/05/21 20:47:44
2
3 Modified: toolchain.eclass
4 Log:
5 adjust case indentation so it is consistent in the whole file
6
7 Revision Changes Path
8 1.592 eclass/toolchain.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.592&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.592&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.591&r2=1.592
13
14 Index: toolchain.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v
17 retrieving revision 1.591
18 retrieving revision 1.592
19 diff -u -r1.591 -r1.592
20 --- toolchain.eclass 21 May 2013 20:44:00 -0000 1.591
21 +++ toolchain.eclass 21 May 2013 20:47:44 -0000 1.592
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.591 2013/05/21 20:44:00 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.592 2013/05/21 20:47:44 vapier Exp $
27 #
28 # Maintainer: Toolchain Ninjas <toolchain@g.o>
29
30 @@ -959,62 +959,62 @@
31
32 local with_abi_map=()
33 case $(tc-arch) in
34 - arm) #264534 #414395
35 - local a arm_arch=${CTARGET%%-*}
36 - # Remove trailing endian variations first: eb el be bl b l
37 - for a in e{b,l} {b,l}e b l ; do
38 - if [[ ${arm_arch} == *${a} ]] ; then
39 - arm_arch=${arm_arch%${a}}
40 - break
41 - fi
42 - done
43 - # Convert armv7{a,r,m} to armv7-{a,r,m}
44 - [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
45 - # See if this is a valid --with-arch flag
46 - if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch};
47 - . "${srcdir}"/config.gcc) &>/dev/null
48 - then
49 - confgcc+=( --with-arch=${arm_arch} )
50 - fi
51 -
52 - # Enable hardvfp
53 - if [[ $(tc-is-softfloat) == "no" ]] && \
54 - [[ ${CTARGET} == armv[67]* ]] && \
55 - tc_version_is_at_least "4.5"
56 - then
57 - # Follow the new arm hardfp distro standard by default
58 - confgcc+=( --with-float=hard )
59 - case ${CTARGET} in
60 - armv6*) confgcc+=( --with-fpu=vfp ) ;;
61 - armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
62 - esac
63 + arm) #264534 #414395
64 + local a arm_arch=${CTARGET%%-*}
65 + # Remove trailing endian variations first: eb el be bl b l
66 + for a in e{b,l} {b,l}e b l ; do
67 + if [[ ${arm_arch} == *${a} ]] ; then
68 + arm_arch=${arm_arch%${a}}
69 + break
70 fi
71 - ;;
72 + done
73 + # Convert armv7{a,r,m} to armv7-{a,r,m}
74 + [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
75 + # See if this is a valid --with-arch flag
76 + if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch};
77 + . "${srcdir}"/config.gcc) &>/dev/null
78 + then
79 + confgcc+=( --with-arch=${arm_arch} )
80 + fi
81 +
82 + # Enable hardvfp
83 + if [[ $(tc-is-softfloat) == "no" ]] && \
84 + [[ ${CTARGET} == armv[67]* ]] && \
85 + tc_version_is_at_least "4.5"
86 + then
87 + # Follow the new arm hardfp distro standard by default
88 + confgcc+=( --with-float=hard )
89 + case ${CTARGET} in
90 + armv6*) confgcc+=( --with-fpu=vfp ) ;;
91 + armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
92 + esac
93 + fi
94 + ;;
95 + mips)
96 # Add --with-abi flags to set default ABI
97 - mips)
98 + confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) )
99 + ;;
100 + amd64)
101 + # drop the older/ABI checks once this get's merged into some
102 + # version of gcc upstream
103 + if tc_version_is_at_least 4.7 && has x32 $(get_all_abis TARGET) ; then
104 confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) )
105 - ;;
106 - amd64)
107 - # drop the older/ABI checks once this get's merged into some
108 - # version of gcc upstream
109 - if tc_version_is_at_least 4.7 && has x32 $(get_all_abis TARGET) ; then
110 - confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) )
111 - fi
112 - ;;
113 + fi
114 + ;;
115 + x86)
116 # Default arch for x86 is normally i386, lets give it a bump
117 # since glibc will do so based on CTARGET anyways
118 - x86)
119 - confgcc+=( --with-arch=${CTARGET%%-*} )
120 - ;;
121 + confgcc+=( --with-arch=${CTARGET%%-*} )
122 + ;;
123 + hppa)
124 # Enable sjlj exceptions for backward compatibility on hppa
125 - hppa)
126 - [[ ${GCCMAJOR} == "3" ]] && confgcc+=( --enable-sjlj-exceptions )
127 - ;;
128 + [[ ${GCCMAJOR} == "3" ]] && confgcc+=( --enable-sjlj-exceptions )
129 + ;;
130 + ppc)
131 # Set up defaults based on current CFLAGS
132 - ppc)
133 - is-flagq -mfloat-gprs=double && confgcc+=( --enable-e500-double )
134 - [[ ${CTARGET//_/-} == *-e500v2-* ]] && confgcc+=( --enable-e500-double )
135 - ;;
136 + is-flagq -mfloat-gprs=double && confgcc+=( --enable-e500-double )
137 + [[ ${CTARGET//_/-} == *-e500v2-* ]] && confgcc+=( --enable-e500-double )
138 + ;;
139 esac
140
141 local GCC_LANG="c"
142 @@ -1138,26 +1138,26 @@
143 # disable a bunch of features or gcc goes boom
144 local needed_libc=""
145 case ${CTARGET} in
146 - *-linux) needed_libc=no-fucking-clue;;
147 - *-dietlibc) needed_libc=dietlibc;;
148 - *-elf|*-eabi) needed_libc=newlib;;
149 - *-freebsd*) needed_libc=freebsd-lib;;
150 - *-gnu*) needed_libc=glibc;;
151 - *-klibc) needed_libc=klibc;;
152 - *-uclibc*)
153 - if ! echo '#include <features.h>' | \
154 - $(tc-getCPP ${CTARGET}) -E -dD - 2>/dev/null | \
155 - grep -q __HAVE_SHARED__
156 - then #291870
157 - confgcc+=( --disable-shared )
158 - fi
159 - needed_libc=uclibc
160 - ;;
161 - *-cygwin) needed_libc=cygwin;;
162 - x86_64-*-mingw*|\
163 - *-w64-mingw*) needed_libc=mingw64-runtime;;
164 - mingw*|*-mingw*) needed_libc=mingw-runtime;;
165 - avr) confgcc+=( --enable-shared --disable-threads );;
166 + *-linux) needed_libc=no-fucking-clue;;
167 + *-dietlibc) needed_libc=dietlibc;;
168 + *-elf|*-eabi) needed_libc=newlib;;
169 + *-freebsd*) needed_libc=freebsd-lib;;
170 + *-gnu*) needed_libc=glibc;;
171 + *-klibc) needed_libc=klibc;;
172 + *-uclibc*)
173 + if ! echo '#include <features.h>' | \
174 + $(tc-getCPP ${CTARGET}) -E -dD - 2>/dev/null | \
175 + grep -q __HAVE_SHARED__
176 + then #291870
177 + confgcc+=( --disable-shared )
178 + fi
179 + needed_libc=uclibc
180 + ;;
181 + *-cygwin) needed_libc=cygwin;;
182 + x86_64-*-mingw*|\
183 + *-w64-mingw*) needed_libc=mingw64-runtime;;
184 + mingw*|*-mingw*) needed_libc=mingw-runtime;;
185 + avr) confgcc+=( --enable-shared --disable-threads );;
186 esac
187 if [[ -n ${needed_libc} ]] ; then
188 local confgcc_no_libc=( --disable-shared )
189 @@ -1186,10 +1186,10 @@
190 confgcc+=( --enable-shared )
191 fi
192 case ${CHOST} in
193 - mingw*|*-mingw*|*-cygwin)
194 - confgcc+=( --enable-threads=win32 ) ;;
195 - *)
196 - confgcc+=( --enable-threads=posix ) ;;
197 + mingw*|*-mingw*|*-cygwin)
198 + confgcc+=( --enable-threads=win32 ) ;;
199 + *)
200 + confgcc+=( --enable-threads=posix ) ;;
201 esac
202 fi
203 # __cxa_atexit is "essential for fully standards-compliant handling of
204 @@ -1431,7 +1431,7 @@
205 replace-cpu-flags c3-2 pentium2 pentium3 pentium3m pentium-m i686
206 ;;
207 esac
208 -
209 +
210 # CFLAGS logic (verified with 3.4.3):
211 # CFLAGS:
212 # This conflicts when creating a crosscompiler, so set to a sane
213 @@ -1982,11 +1982,11 @@
214
215 # this only makes sense for some Linux targets
216 case ${CTARGET} in
217 - x86_64*-linux*) config="i386" ;;
218 - powerpc64*-linux*) config="rs6000" ;;
219 - sparc64*-linux*) config="sparc" ;;
220 - s390x*-linux*) config="s390" ;;
221 - *) return 0 ;;
222 + x86_64*-linux*) config="i386" ;;
223 + powerpc64*-linux*) config="rs6000" ;;
224 + sparc64*-linux*) config="sparc" ;;
225 + s390x*-linux*) config="s390" ;;
226 + *) return 0 ;;
227 esac
228 config+="/t-linux64"