summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-08-01 06:55:30 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-09 09:24:04 +0100
commit1c4444f7b2f5cbcaaf6f9d21d7b4f86555ed746a (patch)
tree31ec4b96c5284936c3c24c35e4179570ab8db909
parent0aadad61bf740bb9a1859381790ecc0f37490c34 (diff)
downloadopenembedded-core-contrib-1c4444f7b2f5cbcaaf6f9d21d7b4f86555ed746a.tar.gz
openembedded-core-contrib-1c4444f7b2f5cbcaaf6f9d21d7b4f86555ed746a.tar.bz2
openembedded-core-contrib-1c4444f7b2f5cbcaaf6f9d21d7b4f86555ed746a.zip
mesa, llvm: Use native version of llvm-config
We have a variable YOCTO_ALTERNATE_EXE_PATH to point to target sysroot, utilize this in mesa to use native version of llvm-config to report values from target sysroot. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-devtools/llvm/llvm_git.bb16
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc4
2 files changed, 11 insertions, 9 deletions
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index 5dcb508c23..722bc53aa1 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -67,12 +67,12 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
EXTRA_OECMAKE_append_class-target = "\
-DCMAKE_CROSSCOMPILING:BOOL=ON \
- -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
+ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
"
EXTRA_OECMAKE_append_class-nativesdk = "\
-DCMAKE_CROSSCOMPILING:BOOL=ON \
- -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
+ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
"
do_configure_prepend() {
@@ -87,12 +87,12 @@ do_compile() {
}
do_compile_class-native() {
- NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-tblgen
+ NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
}
do_install() {
NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install
- install -D -m 0755 ${B}/NATIVE/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config-host
+ install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config
install -d ${D}${bindir}/${LLVM_DIR}
cp -r ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/
@@ -121,7 +121,9 @@ do_install() {
rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so
}
do_install_class-native() {
- install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen
+ install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
+ install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
+ install -D -m 0755 ${B}/lib/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so
}
PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello"
@@ -134,14 +136,14 @@ FILES_${PN}-dbg = " \
${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \
${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \
${libdir}/${LLVM_DIR}/.debug/libLTO.so* \
- ${libdir}/${LLVM_DIR}/.debug/llvm-config-host \
+ ${libdir}/${LLVM_DIR}/.debug/llvm-config \
/usr/src/debug \
"
FILES_${PN}-dev = " \
${bindir}/${LLVM_DIR} \
${includedir}/${LLVM_DIR} \
- ${libdir}/${LLVM_DIR}/llvm-config-host \
+ ${libdir}/${LLVM_DIR}/llvm-config \
"
RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello"
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index a8203fb219..45361c7790 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -25,8 +25,8 @@ REQUIRED_DISTRO_FEATURES = "opengl"
PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)}"
-export LLVM_CONFIG = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config-host"
-
+export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}"
+export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config"
EXTRA_OECONF = "--enable-shared-glapi \
--disable-opencl \
--with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \