Gentoo Archives: gentoo-commits

From: "Bernard Cafarelli (voyageur)" <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-devel/llvm: ChangeLog llvm-9999.ebuild
Date: Tue, 01 Jun 2010 21:25:33
Message-Id: 20100601212528.5CF952CE14@corvid.gentoo.org
1 voyageur 10/06/01 21:25:28
2
3 Modified: ChangeLog
4 Added: llvm-9999.ebuild
5 Log:
6 Add live version, bug #320919
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.14 sys-devel/llvm/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.14&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.14&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?r1=1.13&r2=1.14
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v
19 retrieving revision 1.13
20 retrieving revision 1.14
21 diff -u -r1.13 -r1.14
22 --- ChangeLog 1 Jun 2010 19:29:46 -0000 1.13
23 +++ ChangeLog 1 Jun 2010 21:25:28 -0000 1.14
24 @@ -1,6 +1,11 @@
25 # ChangeLog for sys-devel/llvm
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.13 2010/06/01 19:29:46 voyageur Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.14 2010/06/01 21:25:28 voyageur Exp $
29 +
30 +*llvm-9999 (01 Jun 2010)
31 +
32 + 01 Jun 2010; Bernard Cafarelli <voyageur@g.o> +llvm-9999.ebuild:
33 + Add live version, bug #320919
34
35 01 Jun 2010; Bernard Cafarelli <voyageur@g.o> llvm-2.6-r2.ebuild,
36 llvm-2.7.ebuild:
37
38
39
40 1.1 sys-devel/llvm/llvm-9999.ebuild
41
42 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild?rev=1.1&content-type=text/plain
44
45 Index: llvm-9999.ebuild
46 ===================================================================
47 # Copyright 1999-2010 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.1 2010/06/01 21:25:28 voyageur Exp $
50
51 EAPI="2"
52 inherit subversion eutils multilib toolchain-funcs
53
54 DESCRIPTION="Low Level Virtual Machine"
55 HOMEPAGE="http://llvm.org/"
56 SRC_URI=""
57 ESVN_REPO_URI="http://llvm.org/svn/llvm-project/llvm/trunk"
58
59 LICENSE="UoI-NCSA"
60 SLOT="0"
61 KEYWORDS=""
62 IUSE="alltargets debug +libffi llvm-gcc ocaml test udis86"
63
64 DEPEND="dev-lang/perl
65 >=sys-devel/make-3.79
66 >=sys-devel/flex-2.5.4
67 >=sys-devel/bison-1.28
68 !~sys-devel/bison-1.85
69 !~sys-devel/bison-1.875
70 >=sys-devel/gcc-3.0
71 >=sys-devel/binutils-2.18
72 libffi? ( virtual/libffi )
73 ocaml? ( dev-lang/ocaml )
74 test? ( dev-util/dejagnu )
75 udis86? ( dev-libs/udis86 )"
76 RDEPEND="dev-lang/perl"
77
78 S=${WORKDIR}/${PN}-${PV/_pre*}
79
80 pkg_setup() {
81 # need to check if the active compiler is ok
82
83 broken_gcc=" 3.2.2 3.2.3 3.3.2 4.1.1 "
84 broken_gcc_x86=" 3.4.0 3.4.2 "
85 broken_gcc_amd64=" 3.4.6 "
86
87 gcc_vers=$(gcc-fullversion)
88
89 if [[ ${broken_gcc} == *" ${version} "* ]] ; then
90 elog "Your version of gcc is known to miscompile llvm."
91 elog "Check http://www.llvm.org/docs/GettingStarted.html for"
92 elog "possible solutions."
93 die "Your currently active version of gcc is known to miscompile llvm"
94 fi
95
96 if [[ ${CHOST} == i*86-* && ${broken_gcc_x86} == *" ${version} "* ]] ; then
97 elog "Your version of gcc is known to miscompile llvm on x86"
98 elog "architectures. Check"
99 elog "http://www.llvm.org/docs/GettingStarted.html for possible"
100 elog "solutions."
101 die "Your currently active version of gcc is known to miscompile llvm"
102 fi
103
104 if [[ ${CHOST} == x86_64-* && ${broken_gcc_amd64} == *" ${version} "* ]];
105 then
106 elog "Your version of gcc is known to miscompile llvm in amd64"
107 elog "architectures. Check"
108 elog "http://www.llvm.org/docs/GettingStarted.html for possible"
109 elog "solutions."
110 die "Your currently active version of gcc is known to miscompile llvm"
111 fi
112 }
113
114 src_prepare() {
115 # unfortunately ./configure won't listen to --mandir and the-like, so take
116 # care of this.
117 einfo "Fixing install dirs"
118 sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \
119 -e 's,^PROJ_etcdir.*,PROJ_etcdir := /etc/llvm,' \
120 -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir), \
121 -i Makefile.config.in || die "Makefile.config sed failed"
122
123 einfo "Fixing rpath"
124 sed -e 's/\$(RPATH) -Wl,\$(\(ToolDir\|LibDir\))//g' -i Makefile.rules || die "sed failed"
125
126 epatch "${FILESDIR}"/${PN}-2.7-nodoctargz.patch
127 epatch "${FILESDIR}"/${PN}-2.6-commandguide-nops.patch
128 }
129
130 src_configure() {
131 local CONF_FLAGS=""
132
133 if use debug; then
134 CONF_FLAGS="${CONF_FLAGS} --disable-optimized"
135 einfo "Note: Compiling LLVM in debug mode will create huge and slow binaries"
136 # ...and you probably shouldn't use tmpfs, unless it can hold 900MB
137 else
138 CONF_FLAGS="${CONF_FLAGS} \
139 --enable-optimized \
140 --disable-assertions \
141 --disable-expensive-checks"
142 fi
143
144 if use alltargets; then
145 CONF_FLAGS="${CONF_FLAGS} --enable-targets=all"
146 else
147 CONF_FLAGS="${CONF_FLAGS} --enable-targets=host-only"
148 fi
149
150 if use amd64; then
151 CONF_FLAGS="${CONF_FLAGS} --enable-pic"
152 fi
153
154 # things would be built differently depending on whether llvm-gcc is
155 # used or not.
156 local LLVM_GCC_DIR=/dev/null
157 local LLVM_GCC_DRIVER=nope ; local LLVM_GPP_DRIVER=nope
158 if use llvm-gcc ; then
159 if has_version sys-devel/llvm-gcc; then
160 LLVM_GCC_DIR=$(ls -d ${ROOT}/usr/$(get_libdir)/llvm-gcc* 2> /dev/null)
161 LLVM_GCC_DRIVER=$(find ${LLVM_GCC_DIR} -name 'llvm*-gcc' 2> /dev/null)
162 if [[ -z ${LLVM_GCC_DRIVER} ]] ; then
163 die "failed to find installed llvm-gcc, LLVM_GCC_DIR=${LLVM_GCC_DIR}"
164 fi
165 einfo "Using $LLVM_GCC_DRIVER"
166 LLVM_GPP_DRIVER=${LLVM_GCC_DRIVER/%-gcc/-g++}
167 else
168 eerror "llvm-gcc USE flag enabled, but sys-devel/llvm-gcc was not found"
169 eerror "Building with standard gcc, re-merge this package after installing"
170 eerror "llvm-gcc to build with it"
171 eerror "This is normal behavior on first LLVM merge"
172 fi
173 fi
174
175 CONF_FLAGS="${CONF_FLAGS} \
176 --with-llvmgccdir=${LLVM_GCC_DIR} \
177 --with-llvmgcc=${LLVM_GCC_DRIVER} \
178 --with-llvmgxx=${LLVM_GPP_DRIVER}"
179
180 if use ocaml; then
181 CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml"
182 else
183 CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none"
184 fi
185
186 if use udis86; then
187 CONF_FLAGS="${CONF_FLAGS} --with-udis86"
188 fi
189 CONF_FLAGS="${CONF_FLAGS} $(use_enable libffi)"
190 econf ${CONF_FLAGS} || die "econf failed"
191 }
192
193 src_compile() {
194 emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 || die "emake failed"
195 }
196
197 src_install() {
198 emake KEEP_SYMBOLS=1 DESTDIR="${D}" install || die "install failed"
199 }