Line 0
Link Here
|
|
|
1 |
diff -ur a/llvm-3.5.0.src/projects/compiler-rt/lib/Makefile.mk b/llvm-3.5.0.src/projects/compiler-rt/lib/Makefile.mk |
2 |
--- a/llvm-3.5.0.src/projects/compiler-rt/lib/Makefile.mk 2014-02-14 10:20:33.000000000 -0100 |
Line 0
Link Here
|
|
|
1 |
llvm-musl.patch from alpine linux |
2 |
|
3 |
diff -ru llvm-3.5.0.src.orig/include/llvm/Target/TargetLibraryInfo.h llvm-3.5.0.src/include/llvm/Target/TargetLibraryInfo.h |
4 |
--- llvm-3.5.0.src.orig/include/llvm/Target/TargetLibraryInfo.h 2014-11-13 12:51:53.341455401 +0000 |
Line 0
Link Here
|
|
|
1 |
adapted from llvm-alpine-linux.patch from Alpine |
2 |
|
3 |
diff -ru llvm-3.5.0.src.orig/include/llvm/ADT/Triple.h llvm-3.5.0.src/include/llvm/ADT/Triple.h |
4 |
--- llvm-3.5.0.src.orig/include/llvm/ADT/Triple.h 2014-07-18 17:28:19.000000000 -0300 |
Line 0
Link Here
|
|
|
1 |
Index: cmake/modules/Makefile |
2 |
=================================================================== |
3 |
--- cmake/modules/Makefile (revision 217451) |
Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2015 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-3.5.0.ebuild,v 1.11 2015/01/01 20:53:32 maekke Exp $ |
4 |
|
5 |
EAPI=5 |
6 |
|
7 |
PYTHON_COMPAT=( python2_7 pypy ) |
8 |
|
9 |
inherit eutils flag-o-matic multibuild multilib \ |
10 |
multilib-minimal python-r1 toolchain-funcs pax-utils check-reqs prefix |
11 |
|
12 |
DESCRIPTION="Low Level Virtual Machine" |
13 |
HOMEPAGE="http://llvm.org/" |
14 |
SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz |
15 |
clang? ( http://llvm.org/releases/${PV}/compiler-rt-${PV}.src.tar.xz |
16 |
http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.xz |
17 |
http://llvm.org/releases/${PV}/clang-tools-extra-${PV}.src.tar.xz ) |
18 |
!doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" |
19 |
|
20 |
LICENSE="UoI-NCSA" |
21 |
SLOT="0/3.5" |
22 |
KEYWORDS="amd64 arm ppc x86" |
23 |
IUSE="clang debug doc gold libedit +libffi multitarget ncurses ocaml python |
24 |
+static-analyzer test xml video_cards_radeon |
25 |
kernel_Darwin kernel_FreeBSD" |
26 |
|
27 |
COMMON_DEPEND=" |
28 |
sys-libs/zlib:0= |
29 |
clang? ( |
30 |
python? ( ${PYTHON_DEPS} ) |
31 |
static-analyzer? ( |
32 |
dev-lang/perl:* |
33 |
${PYTHON_DEPS} |
34 |
) |
35 |
xml? ( dev-libs/libxml2:2= ) |
36 |
) |
37 |
gold? ( >=sys-devel/binutils-2.22:*[cxx] ) |
38 |
libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] ) |
39 |
libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] ) |
40 |
ncurses? ( >=sys-libs/ncurses-5.9-r3:5=[${MULTILIB_USEDEP}] ) |
41 |
ocaml? ( dev-lang/ocaml:0= )" |
42 |
# configparser-3.2 breaks the build (3.3 or none at all are fine) |
43 |
DEPEND="${COMMON_DEPEND} |
44 |
app-arch/xz-utils |
45 |
dev-lang/perl |
46 |
>=sys-devel/make-3.81 |
47 |
>=sys-devel/flex-2.5.4 |
48 |
>=sys-devel/bison-1.875d |
49 |
|| ( >=sys-devel/gcc-3.0 >=sys-devel/gcc-apple-4.2.1 |
50 |
( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx ) |
51 |
) |
52 |
|| ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-3.2.3 ) |
53 |
clang? ( xml? ( virtual/pkgconfig ) ) |
54 |
doc? ( dev-python/sphinx ) |
55 |
libffi? ( virtual/pkgconfig ) |
56 |
!!<dev-python/configparser-3.3.0.2 |
57 |
${PYTHON_DEPS}" |
58 |
RDEPEND="${COMMON_DEPEND} |
59 |
clang? ( !<=sys-devel/clang-${PV}-r99 |
60 |
!>=sys-devel/clang-9999 ) |
61 |
abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r2 |
62 |
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
63 |
PDEPEND="clang? ( =sys-devel/clang-${PV}-r100 )" |
64 |
|
65 |
# pypy gives me around 1700 unresolved tests due to open file limit |
66 |
# being exceeded. probably GC does not close them fast enough. |
67 |
REQUIRED_USE="${PYTHON_REQUIRED_USE} |
68 |
test? ( || ( $(python_gen_useflags 'python*') ) )" |
69 |
|
70 |
S=${WORKDIR}/${P}.src |
71 |
|
72 |
# Some people actually override that in make.conf. That sucks since |
73 |
# we need to run install per-directory, and ninja can't do that... |
74 |
# so why did it call itself ninja in the first place? |
75 |
CMAKE_MAKEFILE_GENERATOR=emake |
76 |
|
77 |
pkg_pretend() { |
78 |
# in megs |
79 |
# !clang !debug !multitarget -O2 400 |
80 |
# !clang !debug multitarget -O2 550 |
81 |
# clang !debug !multitarget -O2 950 |
82 |
# clang !debug multitarget -O2 1200 |
83 |
# !clang debug multitarget -O2 5G |
84 |
# clang !debug multitarget -O0 -g 12G |
85 |
# clang debug multitarget -O2 16G |
86 |
# clang debug multitarget -O0 -g 14G |
87 |
|
88 |
local build_size=550 |
89 |
use clang && build_size=1200 |
90 |
|
91 |
if use debug; then |
92 |
ewarn "USE=debug is known to increase the size of package considerably" |
93 |
ewarn "and cause the tests to fail." |
94 |
ewarn |
95 |
|
96 |
(( build_size *= 14 )) |
97 |
elif is-flagq -g || is-flagq -ggdb; then |
98 |
ewarn "The C++ compiler -g option is known to increase the size of the package" |
99 |
ewarn "considerably. If you run out of space, please consider removing it." |
100 |
ewarn |
101 |
|
102 |
(( build_size *= 10 )) |
103 |
fi |
104 |
|
105 |
# Multiply by number of ABIs :). |
106 |
local abis=( $(multilib_get_enabled_abis) ) |
107 |
(( build_size *= ${#abis[@]} )) |
108 |
|
109 |
local CHECKREQS_DISK_BUILD=${build_size}M |
110 |
check-reqs_pkg_pretend |
111 |
|
112 |
if [[ ${MERGE_TYPE} != binary ]]; then |
113 |
echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
114 |
ebegin "Trying to build a C++11 test program" |
115 |
if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
116 |
eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
117 |
eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
118 |
eerror "to gcc-4.7 or an equivalent version supporting C++11." |
119 |
die "Currently active compiler does not support -std=c++11" |
120 |
fi |
121 |
eend ${?} |
122 |
fi |
123 |
} |
124 |
|
125 |
pkg_setup() { |
126 |
pkg_pretend |
127 |
} |
128 |
|
129 |
src_unpack() { |
130 |
default |
131 |
|
132 |
rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ |
133 |
|| die "symlinks removal failed" |
134 |
|
135 |
if use clang; then |
136 |
mv "${WORKDIR}"/cfe-${PV}.src "${S}"/tools/clang \ |
137 |
|| die "clang source directory move failed" |
138 |
mv "${WORKDIR}"/compiler-rt-${PV}.src "${S}"/projects/compiler-rt \ |
139 |
|| die "compiler-rt source directory move failed" |
140 |
mv "${WORKDIR}"/clang-tools-extra-${PV}.src "${S}"/tools/clang/tools/extra \ |
141 |
|| die "clang-tools-extra source directory move failed" |
142 |
fi |
143 |
} |
144 |
|
145 |
src_prepare() { |
146 |
epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch |
147 |
epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch |
148 |
epatch "${FILESDIR}"/${PN}-3.5-gentoo-install.patch |
149 |
|
150 |
epatch "${FILESDIR}"/${PN}-3.5-musl-fixes.patch |
151 |
epatch "${FILESDIR}"/${PN}-3.5-musl-support.patch |
152 |
epatch "${FILESDIR}"/${PN}-3.5-musl-compiler-rt.patch |
153 |
|
154 |
epatch "${FILESDIR}"/${P}-fix_LLVMExports_cmake.patch |
155 |
|
156 |
if use clang; then |
157 |
# Automatically select active system GCC's libraries, bugs #406163 and #417913 |
158 |
epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
159 |
|
160 |
epatch "${FILESDIR}"/clang-3.5-gentoo-install.patch |
161 |
epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
162 |
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
163 |
fi |
164 |
|
165 |
if use prefix && use clang; then |
166 |
sed -i -e "/^CFLAGS /s@-Werror@-I${EPREFIX}/usr/include@" \ |
167 |
projects/compiler-rt/make/platform/clang_*.mk || die |
168 |
fi |
169 |
|
170 |
local sub_files=( |
171 |
Makefile.config.in |
172 |
Makefile.rules |
173 |
tools/llvm-config/llvm-config.cpp |
174 |
) |
175 |
use clang && sub_files+=( |
176 |
tools/clang/lib/Driver/Tools.cpp |
177 |
tools/clang/tools/scan-build/scan-build |
178 |
) |
179 |
|
180 |
# unfortunately ./configure won't listen to --mandir and the-like, so take |
181 |
# care of this. |
182 |
# note: we're setting the main libdir intentionally. |
183 |
# where per-ABI is appropriate, we use $(GENTOO_LIBDIR) make. |
184 |
einfo "Fixing install dirs" |
185 |
sed -e "s,@libdir@,$(get_libdir),g" \ |
186 |
-e "s,@PF@,${PF},g" \ |
187 |
-e "s,@EPREFIX@,${EPREFIX},g" \ |
188 |
-i "${sub_files[@]}" \ |
189 |
|| die "install paths sed failed" |
190 |
|
191 |
if use clang; then |
192 |
# constantly fails for a long time, likely due to our patches |
193 |
rm tools/clang/test/Driver/cross-linux.c || die |
194 |
fi |
195 |
|
196 |
# User patches |
197 |
epatch_user |
198 |
|
199 |
python_setup |
200 |
} |
201 |
|
202 |
multilib_src_configure() { |
203 |
# disable timestamps since they confuse ccache |
204 |
local conf_flags=( |
205 |
--disable-timestamps |
206 |
--enable-keep-symbols |
207 |
--enable-shared |
208 |
--with-optimize-option= |
209 |
$(tc-is-static-only && echo --disable-shared) |
210 |
$(use_enable !debug optimized) |
211 |
$(use_enable debug assertions) |
212 |
$(use_enable debug expensive-checks) |
213 |
$(use_enable libedit) |
214 |
$(use_enable ncurses terminfo) |
215 |
$(use_enable libffi) |
216 |
) |
217 |
|
218 |
# well, it's used only by clang executable c-index-test |
219 |
if multilib_is_native_abi && use clang && use xml; then |
220 |
conf_flags+=( XML2CONFIG="$(tc-getPKG_CONFIG) libxml-2.0" ) |
221 |
else |
222 |
conf_flags+=( ac_cv_prog_XML2CONFIG="" ) |
223 |
fi |
224 |
|
225 |
local targets bindings |
226 |
if use multitarget; then |
227 |
targets='all' |
228 |
else |
229 |
targets='host,cpp' |
230 |
use video_cards_radeon && targets+=',r600' |
231 |
fi |
232 |
conf_flags+=( --enable-targets=${targets} ) |
233 |
|
234 |
if multilib_is_native_abi; then |
235 |
use gold && conf_flags+=( --with-binutils-include="${EPREFIX}"/usr/include/ ) |
236 |
# extra commas don't hurt |
237 |
use ocaml && bindings+=',ocaml' |
238 |
fi |
239 |
|
240 |
[[ ${bindings} ]] || bindings='none' |
241 |
conf_flags+=( --enable-bindings=${bindings} ) |
242 |
|
243 |
if use libffi; then |
244 |
local CPPFLAGS=${CPPFLAGS} |
245 |
append-cppflags "$(pkg-config --cflags libffi)" |
246 |
fi |
247 |
|
248 |
# llvm prefers clang over gcc, so we may need to force that |
249 |
tc-export CC CXX |
250 |
|
251 |
ECONF_SOURCE=${S} \ |
252 |
econf "${conf_flags[@]}" |
253 |
} |
254 |
|
255 |
set_makeargs() { |
256 |
MAKEARGS=( |
257 |
VERBOSE=1 |
258 |
REQUIRES_RTTI=1 |
259 |
GENTOO_LIBDIR=$(get_libdir) |
260 |
) |
261 |
|
262 |
# for tests, we want it all! otherwise, we may use a little filtering... |
263 |
# adding ONLY_TOOLS also disables unittest building... |
264 |
if [[ ${EBUILD_PHASE_FUNC} != src_test ]]; then |
265 |
local tools=( llvm-config ) |
266 |
use clang && tools+=( clang ) |
267 |
|
268 |
if multilib_is_native_abi; then |
269 |
tools+=( |
270 |
opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link lli |
271 |
llvm-extract llvm-mc llvm-bcanalyzer llvm-diff macho-dump |
272 |
llvm-objdump llvm-readobj llvm-rtdyld llvm-dwarfdump llvm-cov |
273 |
llvm-size llvm-stress llvm-mcmarkup llvm-profdata |
274 |
llvm-symbolizer obj2yaml yaml2obj lto bugpoint |
275 |
) |
276 |
|
277 |
# the build system runs explicitly specified tools in parallel, |
278 |
# so we need to split it into two runs |
279 |
if [[ ${1} != -1 ]]; then |
280 |
# those require lto |
281 |
tools+=( llvm-lto ) |
282 |
use gold && tools+=( gold ) |
283 |
|
284 |
# those require clang :) |
285 |
# we need to explicitly specify all its tools |
286 |
# since we're passing BUILD_CLANG_ONLY |
287 |
use clang && tools+=( |
288 |
clang/tools/{clang-check,clang-format,extra} |
289 |
) |
290 |
fi |
291 |
fi |
292 |
|
293 |
MAKEARGS+=( |
294 |
# filter tools + disable unittests implicitly |
295 |
ONLY_TOOLS="${tools[*]}" |
296 |
|
297 |
# this disables unittests & docs from clang |
298 |
BUILD_CLANG_ONLY=YES |
299 |
) |
300 |
fi |
301 |
} |
302 |
|
303 |
multilib_src_compile() { |
304 |
local MAKEARGS |
305 |
set_makeargs -1 |
306 |
emake "${MAKEARGS[@]}" |
307 |
|
308 |
if multilib_is_native_abi; then |
309 |
set_makeargs |
310 |
emake -C tools "${MAKEARGS[@]}" |
311 |
|
312 |
if use doc; then |
313 |
emake -C "${S}"/docs -f Makefile.sphinx man |
314 |
use clang && emake -C "${S}"/tools/clang/docs/tools \ |
315 |
BUILD_FOR_WEBSITE=1 DST_MAN_DIR="${T}"/ man |
316 |
emake -C "${S}"/docs -f Makefile.sphinx html |
317 |
fi |
318 |
fi |
319 |
|
320 |
if use debug; then |
321 |
pax-mark m Debug+Asserts+Checks/bin/llvm-rtdyld |
322 |
pax-mark m Debug+Asserts+Checks/bin/lli |
323 |
pax-mark m Debug+Asserts+Checks/bin/lli-child-target |
324 |
else |
325 |
pax-mark m Release/bin/llvm-rtdyld |
326 |
pax-mark m Release/bin/lli |
327 |
pax-mark m Release/bin/lli-child-target |
328 |
fi |
329 |
} |
330 |
|
331 |
multilib_src_test() { |
332 |
local MAKEARGS |
333 |
set_makeargs |
334 |
|
335 |
# build the remaining tools & unittests |
336 |
emake "${MAKEARGS[@]}" |
337 |
|
338 |
pax-mark m unittests/ExecutionEngine/JIT/Release/JITTests |
339 |
pax-mark m unittests/ExecutionEngine/MCJIT/Release/MCJITTests |
340 |
pax-mark m unittests/Support/Release/SupportTests |
341 |
|
342 |
# respect TMPDIR! |
343 |
local -x LIT_PRESERVES_TMP=1 |
344 |
emake "${MAKEARGS[@]}" check |
345 |
use clang && emake "${MAKEARGS[@]}" -C tools/clang test |
346 |
} |
347 |
|
348 |
src_install() { |
349 |
local MULTILIB_CHOST_TOOLS=( |
350 |
/usr/bin/llvm-config |
351 |
) |
352 |
|
353 |
local MULTILIB_WRAPPED_HEADERS=( |
354 |
/usr/include/llvm/Config/config.h |
355 |
/usr/include/llvm/Config/llvm-config.h |
356 |
) |
357 |
|
358 |
if use clang; then |
359 |
# note: magic applied below |
360 |
MULTILIB_CHOST_TOOLS+=( |
361 |
/usr/bin/clang |
362 |
/usr/bin/clang++ |
363 |
/usr/bin/clang-${PV} |
364 |
/usr/bin/clang++-${PV} |
365 |
) |
366 |
|
367 |
MULTILIB_WRAPPED_HEADERS+=( |
368 |
/usr/include/clang/Config/config.h |
369 |
) |
370 |
fi |
371 |
|
372 |
multilib-minimal_src_install |
373 |
|
374 |
# Remove unnecessary headers on FreeBSD, bug #417171 |
375 |
use kernel_FreeBSD && use clang && rm "${ED}"usr/lib/clang/${PV}/include/{std,float,iso,limits,tgmath,varargs}*.h |
376 |
} |
377 |
|
378 |
multilib_src_install() { |
379 |
local MAKEARGS |
380 |
set_makeargs |
381 |
|
382 |
local root=${D}/_${ABI} |
383 |
|
384 |
emake "${MAKEARGS[@]}" DESTDIR="${root}" install |
385 |
multibuild_merge_root "${root}" "${D}" |
386 |
|
387 |
if ! multilib_is_native_abi; then |
388 |
# Backwards compat, will be happily removed someday. |
389 |
dosym "${CHOST}"-llvm-config /usr/bin/llvm-config.${ABI} |
390 |
else |
391 |
# Install docs. |
392 |
if use doc; then |
393 |
doman "${S}"/docs/_build/man/*.1 |
394 |
use clang && doman "${T}"/clang.1 |
395 |
dohtml -r "${S}"/docs/_build/html/ |
396 |
else |
397 |
if ! use clang; then |
398 |
rm "${WORKDIR}"/${P}-manpages/clang.1 || die |
399 |
fi |
400 |
doman "${WORKDIR}"/${P}-manpages/*.1 |
401 |
fi |
402 |
|
403 |
# Symlink the gold plugin. |
404 |
if use gold; then |
405 |
dodir /usr/${CHOST}/binutils-bin/lib/bfd-plugins |
406 |
dosym ../../../../$(get_libdir)/LLVMgold.so \ |
407 |
/usr/${CHOST}/binutils-bin/lib/bfd-plugins/LLVMgold.so |
408 |
fi |
409 |
fi |
410 |
|
411 |
# apply CHOST and PV to clang executables |
412 |
# they're statically linked so we don't have to worry about the lib |
413 |
if use clang; then |
414 |
local clang_tools=( clang clang++ ) |
415 |
local i |
416 |
|
417 |
# append ${PV} and symlink back |
418 |
# TODO: use alternatives.eclass? does that make any sense? |
419 |
# maybe with USE=-clang on :0 and USE=clang on older |
420 |
for i in "${clang_tools[@]}"; do |
421 |
mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die |
422 |
dosym "${i}"-${PV} /usr/bin/${i} |
423 |
done |
424 |
|
425 |
# now prepend ${CHOST} and let the multilib-build.eclass symlink it |
426 |
if ! multilib_is_native_abi; then |
427 |
# non-native? let's replace it with a simple wrapper |
428 |
for i in "${clang_tools[@]}"; do |
429 |
rm "${ED%/}/usr/bin/${i}-${PV}" || die |
430 |
cat > "${T}"/wrapper.tmp <<-_EOF_ |
431 |
#!${EPREFIX}/bin/sh |
432 |
exec "${i}-${PV}" $(get_abi_CFLAGS) "\${@}" |
433 |
_EOF_ |
434 |
newbin "${T}"/wrapper.tmp "${i}-${PV}" |
435 |
done |
436 |
fi |
437 |
fi |
438 |
|
439 |
# Fix install_names on Darwin. The build system is too complicated |
440 |
# to just fix this, so we correct it post-install |
441 |
local lib= f= odylib= ndylib= libpv=${PV} |
442 |
if [[ ${CHOST} == *-darwin* ]] ; then |
443 |
eval $(grep PACKAGE_VERSION= configure) |
444 |
[[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} |
445 |
for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt,clang}.dylib LLVMHello.dylib clang/${libpv}/lib/darwin/libclang_rt.asan_osx_dynamic.dylib; do |
446 |
# libEnhancedDisassembly is Darwin10 only, so non-fatal |
447 |
# + omit clang libs if not enabled |
448 |
[[ -f ${ED}/usr/lib/${lib} ]] || continue |
449 |
|
450 |
ebegin "fixing install_name of $lib" |
451 |
install_name_tool \ |
452 |
-id "${EPREFIX}"/usr/lib/${lib} \ |
453 |
"${ED}"/usr/lib/${lib} |
454 |
eend $? |
455 |
done |
456 |
for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/lib*.dylib "${ED}"/usr/lib/clang/${libpv}/lib/darwin/*.dylib ; do |
457 |
# omit clang libs if not enabled |
458 |
[[ -f ${ED}/usr/lib/${lib} ]] || continue |
459 |
|
460 |
scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | \ |
461 |
while read odylib ; do |
462 |
ndylib= |
463 |
case ${odylib} in |
464 |
*/libclang.dylib) |
465 |
ndylib="${EPREFIX}"/usr/lib/libclang.dylib |
466 |
;; |
467 |
*/libLLVM-${libpv}.dylib) |
468 |
ndylib="${EPREFIX}"/usr/lib/libLLVM-${libpv}.dylib |
469 |
;; |
470 |
*/libLTO.dylib) |
471 |
ndylib="${EPREFIX}"/usr/lib/libLTO.dylib |
472 |
;; |
473 |
esac |
474 |
if [[ -n ${ndylib} ]] ; then |
475 |
ebegin "fixing install_name reference to ${odylib} of ${f##*/}" |
476 |
install_name_tool \ |
477 |
-change "${odylib}" "${ndylib}" \ |
478 |
"${f}" |
479 |
eend $? |
480 |
fi |
481 |
done |
482 |
done |
483 |
fi |
484 |
} |
485 |
|
486 |
multilib_src_install_all() { |
487 |
insinto /usr/share/vim/vimfiles/syntax |
488 |
doins utils/vim/*.vim |
489 |
|
490 |
if use clang; then |
491 |
cd tools/clang || die |
492 |
|
493 |
if use static-analyzer ; then |
494 |
dobin tools/scan-build/ccc-analyzer |
495 |
dosym ccc-analyzer /usr/bin/c++-analyzer |
496 |
dobin tools/scan-build/scan-build |
497 |
|
498 |
insinto /usr/share/${PN} |
499 |
doins tools/scan-build/scanview.css |
500 |
doins tools/scan-build/sorttable.js |
501 |
fi |
502 |
|
503 |
python_inst() { |
504 |
if use static-analyzer ; then |
505 |
pushd tools/scan-view >/dev/null || die |
506 |
|
507 |
python_doscript scan-view |
508 |
|
509 |
touch __init__.py || die |
510 |
python_moduleinto clang |
511 |
python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py |
512 |
|
513 |
popd >/dev/null || die |
514 |
fi |
515 |
|
516 |
if use python ; then |
517 |
pushd bindings/python/clang >/dev/null || die |
518 |
|
519 |
python_moduleinto clang |
520 |
python_domodule __init__.py cindex.py enumerations.py |
521 |
|
522 |
popd >/dev/null || die |
523 |
fi |
524 |
|
525 |
# AddressSanitizer symbolizer (currently separate) |
526 |
python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py |
527 |
} |
528 |
python_foreach_impl python_inst |
529 |
fi |
530 |
} |