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: Thu, 28 Oct 2010 04:24:18
Message-Id: 20101028042413.7DA3020051@flycatcher.gentoo.org
1 vapier 10/10/28 04:24:13
2
3 Modified: toolchain.eclass
4 Log:
5 turn large if statement with globs into a case, merge the *-elf logic, and add *-eabi #283545
6
7 Revision Changes Path
8 1.441 eclass/toolchain.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.441&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.441&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.440&r2=1.441
13
14 Index: toolchain.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v
17 retrieving revision 1.440
18 retrieving revision 1.441
19 diff -u -r1.440 -r1.441
20 --- toolchain.eclass 10 Oct 2010 07:32:33 -0000 1.440
21 +++ toolchain.eclass 28 Oct 2010 04:24:13 -0000 1.441
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2008 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.440 2010/10/10 07:32:33 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.441 2010/10/28 04:24:13 vapier Exp $
27 #
28 # Maintainer: Toolchain Ninjas <toolchain@g.o>
29
30 @@ -1362,7 +1362,7 @@
31 case ${CTARGET} in
32 *-linux) needed_libc=no-fucking-clue;;
33 *-dietlibc) needed_libc=dietlibc;;
34 - *-elf) needed_libc=newlib;;
35 + *-elf|*-eabi) needed_libc=newlib;;
36 *-freebsd*) needed_libc=freebsd-lib;;
37 *-gnu*) needed_libc=glibc;;
38 *-klibc) needed_libc=klibc;;
39 @@ -1399,23 +1399,30 @@
40 confgcc="${confgcc} --enable-threads=posix" ;;
41 esac
42 fi
43 - [[ ${CTARGET} == *-elf ]] && confgcc="${confgcc} --with-newlib"
44 # __cxa_atexit is "essential for fully standards-compliant handling of
45 # destructors", but apparently requires glibc.
46 - if [[ ${CTARGET} == *-uclibc* ]] ; then
47 + case ${CTARGET} in
48 + *-uclibc*)
49 confgcc="${confgcc} --disable-__cxa_atexit --enable-target-optspace $(use_enable nptl tls)"
50 [[ ${GCCMAJOR}.${GCCMINOR} == 3.3 ]] && confgcc="${confgcc} --enable-sjlj-exceptions"
51 if tc_version_is_at_least 3.4 && [[ ${GCCMAJOR}.${GCCMINOR} < 4.3 ]] ; then
52 confgcc="${confgcc} --enable-clocale=uclibc"
53 fi
54 - elif [[ ${CTARGET} == *-gnu* ]] ; then
55 + ;;
56 + *-elf|*-eabi)
57 + confgcc="${confgcc} --with-newlib"
58 + ;;
59 + *-gnu*)
60 confgcc="${confgcc} --enable-__cxa_atexit"
61 confgcc="${confgcc} --enable-clocale=gnu"
62 - elif [[ ${CTARGET} == *-freebsd* ]]; then
63 + ;;
64 + *-freebsd*)
65 confgcc="${confgcc} --enable-__cxa_atexit"
66 - elif [[ ${CTARGET} == *-solaris* ]]; then
67 + ;;
68 + *-solaris*)
69 confgcc="${confgcc} --enable-__cxa_atexit"
70 - fi
71 + ;;
72 + esac
73 [[ ${GCCMAJOR}.${GCCMINOR} < 3.4 ]] && confgcc="${confgcc} --disable-libunwind-exceptions"
74
75 # create a sparc*linux*-{gcc,g++} that can handle -m32 and -m64 (biarch)