blob: a416dfd82dafa857c1b832b220732fbd39e6adb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#
# Since we need LLVM 3.4 but meta-oe currently only supports
# 3.3, override the minimum bits needed to get it to work.
# Eventually this will need to be reconciled with upstream
#
# Ideally this would be done as a patch but since llvm3.inc already
# manipulates this file with sed we have to do similar. We also need
# to do this as an append to ensure proper sequencing.
do_configure_append_x86-64() {
# Fix paths in llvm-config
sed -ri "s#lib/${LLVM_DIR}#lib64/${LLVM_DIR}#g" ${S}/tools/llvm-config/llvm-config.cpp
}
#
# Override the do_install() provided by llvm3.inc to use the lib64
# directory naming.
#
# This should probably be cleaned up at some point in the stock LLVM
# sources but at the moment they do not appear to handle lib64 very well.
#
do_install() {
cd ${LLVM_BUILD_DIR}
oe_runmake DESTDIR=${LLVM_INSTALL_DIR} install
mv ${LLVM_INSTALL_DIR}${bindir}/${HOST_SYS}-llvm-config-host ${LLVM_INSTALL_DIR}/llvm-config-host
install -d ${D}${bindir}/${LLVM_DIR}
mv ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/
install -d ${D}${includedir}/${LLVM_DIR}
mv ${LLVM_INSTALL_DIR}${includedir}/* ${D}${includedir}/${LLVM_DIR}/
install -d ${D}${libdir}/${LLVM_DIR}
# The LLVM sources have "/lib" embedded and so we cannot completely rely on the ${libdir} variable
if [ -d ${LLVM_INSTALL_DIR}${libdir}/ ]; then
mv ${LLVM_INSTALL_DIR}${libdir}/* ${D}${libdir}/${LLVM_DIR}/
elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib ]; then
mv ${LLVM_INSTALL_DIR}${prefix}/lib/* ${D}${libdir}/${LLVM_DIR}/
elif [ -d ${LLVM_INSTALL_DIR}${prefix}/lib64 ]; then
mv ${LLVM_INSTALL_DIR}${prefix}/lib64/* ${D}${libdir}/${LLVM_DIR}/
fi
ln -s ${LLVM_DIR}/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so
install -d ${D}${docdir}/${LLVM_DIR}
mv ${LLVM_INSTALL_DIR}${prefix}/docs/llvm/* ${D}${docdir}/${LLVM_DIR}
}
|