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-2.6.ebuild llvm-2.6_pre2.ebuild
Date: Sun, 25 Oct 2009 20:20:57
Message-Id: E1N29aB-0000gF-KI@stork.gentoo.org
1 voyageur 09/10/25 20:20:55
2
3 Modified: ChangeLog
4 Added: llvm-2.6.ebuild
5 Removed: llvm-2.6_pre2.ebuild
6 Log:
7 Bump to final 2.6 release
8 (Portage version: 2.2_rc46/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.4 sys-devel/llvm/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.4&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.4&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/llvm/ChangeLog?r1=1.3&r2=1.4
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v
20 retrieving revision 1.3
21 retrieving revision 1.4
22 diff -u -r1.3 -r1.4
23 --- ChangeLog 7 Oct 2009 15:16:59 -0000 1.3
24 +++ ChangeLog 25 Oct 2009 20:20:55 -0000 1.4
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-devel/llvm
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.3 2009/10/07 15:16:59 voyageur Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.4 2009/10/25 20:20:55 voyageur Exp $
30 +
31 +*llvm-2.6 (25 Oct 2009)
32 +
33 + 25 Oct 2009; Bernard Cafarelli <voyageur@g.o>
34 + -llvm-2.6_pre2.ebuild, +llvm-2.6.ebuild:
35 + Bump to final 2.6 release
36
37 07 Oct 2009; Bernard Cafarelli <voyageur@g.o> llvm-2.6_pre2.ebuild,
38 +files/llvm-2.6-nodoctargz.patch, -files/llvm-2.6-nohtmltargz.patch:
39
40
41
42 1.1 sys-devel/llvm/llvm-2.6.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/llvm/llvm-2.6.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/llvm/llvm-2.6.ebuild?rev=1.1&content-type=text/plain
46
47 Index: llvm-2.6.ebuild
48 ===================================================================
49 # Copyright 1999-2009 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-2.6.ebuild,v 1.1 2009/10/25 20:20:55 voyageur Exp $
52
53 EAPI="2"
54 inherit eutils multilib toolchain-funcs
55
56 DESCRIPTION="Low Level Virtual Machine"
57 HOMEPAGE="http://llvm.org/"
58 SRC_URI="http://llvm.org/releases/${PV}/${P}.tar.gz"
59
60 LICENSE="UoI-NCSA"
61 SLOT="0"
62 KEYWORDS="~amd64 ~ppc ~x86"
63 IUSE="alltargets debug llvm-gcc ocaml test"
64
65 DEPEND="dev-lang/perl
66 >=sys-devel/make-3.79
67 >=sys-devel/flex-2.5.4
68 >=sys-devel/bison-1.28
69 !~sys-devel/bison-1.85
70 !~sys-devel/bison-1.875
71 >=sys-devel/gcc-3.0
72 >=sys-devel/binutils-2.18
73 llvm-gcc? ( sys-devel/llvm-gcc )
74 ocaml? ( dev-lang/ocaml )
75 test? ( dev-util/dejagnu )"
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 := $(DESTDIR)$(PROJ_prefix)/share/doc/'${PF}, \
119 -e 's,^PROJ_etcdir.*,PROJ_etcdir := $(DESTDIR)/etc/llvm,' \
120 -e 's,^PROJ_libdir.*,PROJ_libdir := $(DESTDIR)/usr/'$(get_libdir), \
121 -i Makefile.config.in || die "sed failed"
122
123 # this points by default to the build directory
124 einfo "Fixing gccld and gccas"
125 sed -e 's,^TOOLDIR.*,TOOLDIR=/usr/bin,' \
126 -i tools/gccld/gccld.sh tools/gccas/gccas.sh || die "sed failed"
127
128 einfo "Fixing rpath"
129 sed -e 's/\$(RPATH) -Wl,\$(\(ToolDir\|LibDir\))//g' -i Makefile.rules || die "sed failed"
130
131 # Fix docs installation
132 sed -e '/^NO_INSTALL_MANS/s/$/$(DST_MAN_DIR)tblgen.1 $(DST_MAN_DIR)llvmgcc.1 $(DST_MAN_DIR)llvmgxx.1/' \
133 -i docs/CommandGuide/Makefile || die "manpages sed failed"
134 epatch "${FILESDIR}"/${PN}-2.6-nodoctargz.patch
135
136 # Buggy test, http://llvm.org/bugs/show_bug.cgi?id=5047
137 rm test/DebugInfo/2009-01-15-dbg_declare.ll
138 }
139
140 src_configure() {
141 local CONF_FLAGS=""
142
143 if use debug; then
144 CONF_FLAGS="${CONF_FLAGS} --disable-optimized"
145 einfo "Note: Compiling LLVM in debug mode will create huge and slow binaries"
146 # ...and you probably shouldn't use tmpfs, unless it can hold 900MB
147 else
148 CONF_FLAGS="${CONF_FLAGS} \
149 --enable-optimized \
150 --disable-assertions \
151 --disable-expensive-checks"
152 fi
153
154 if use alltargets; then
155 CONF_FLAGS="${CONF_FLAGS} --enable-targets=all"
156 else
157 CONF_FLAGS="${CONF_FLAGS} --enable-targets=host-only"
158 fi
159
160 if use amd64; then
161 CONF_FLAGS="${CONF_FLAGS} --enable-pic"
162 fi
163
164 # things would be built differently depending on whether llvm-gcc is
165 # used or not.
166 local LLVM_GCC_DIR=/dev/null
167 local LLVM_GCC_DRIVER=nope ; local LLVM_GPP_DRIVER=nope
168 if use llvm-gcc ; then
169 LLVM_GCC_DIR=$(ls -d ${ROOT}/usr/$(get_libdir)/llvm-gcc* 2> /dev/null)
170 LLVM_GCC_DRIVER=$(find ${LLVM_GCC_DIR} -name 'llvm*-gcc' 2> /dev/null)
171
172 if [[ -z ${LLVM_GCC_DRIVER} ]] ; then
173 die "failed to find installed llvm-gcc, LLVM_GCC_DIR=${LLVM_GCC_DIR}"
174 fi
175
176 einfo "Using $LLVM_GCC_DRIVER"
177 LLVM_GPP_DRIVER=${LLVM_GCC_DRIVER/%-gcc/-g++}
178 fi
179
180 CONF_FLAGS="${CONF_FLAGS} \
181 --with-llvmgccdir=${LLVM_GCC_DIR} \
182 --with-llvmgcc=${LLVM_GCC_DRIVER} \
183 --with-llvmgxx=${LLVM_GPP_DRIVER}"
184
185 if use ocaml; then
186 CONF_FLAGS="${CONF_FLAGS} --enable-bindings=ocaml"
187 else
188 CONF_FLAGS="${CONF_FLAGS} --enable-bindings=none"
189 fi
190 econf ${CONF_FLAGS} || die "econf failed"
191 }
192
193 src_compile() {
194 emake VERBOSE=1 KEEP_SYMBOLS=1 || die "emake failed"
195 }
196
197 src_install() {
198 emake KEEP_SYMBOLS=1 DESTDIR="${D}" install || die "install failed"
199 }