diff options
| author | Khem Raj <raj.khem@gmail.com> | 2017-08-01 06:55:30 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-09 09:24:16 +0100 |
| commit | a479bdd4fbe5a3090739b720aac319cb795b277d (patch) | |
| tree | cf85b754a5c943b85e2ba5431f88869af045b818 | |
| parent | 3adf66fc4bf56bf92c4acb199a18a8db3a1ccc2a (diff) | |
| download | poky-a479bdd4fbe5a3090739b720aac319cb795b277d.tar.gz | |
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.
(From OE-Core rev: 1c4444f7b2f5cbcaaf6f9d21d7b4f86555ed746a)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/llvm/llvm_git.bb | 16 | ||||
| -rw-r--r-- | meta/recipes-graphics/mesa/mesa.inc | 4 |
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 \ | |||
| 67 | 67 | ||
| 68 | EXTRA_OECMAKE_append_class-target = "\ | 68 | EXTRA_OECMAKE_append_class-target = "\ |
| 69 | -DCMAKE_CROSSCOMPILING:BOOL=ON \ | 69 | -DCMAKE_CROSSCOMPILING:BOOL=ON \ |
| 70 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | 70 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ |
| 71 | " | 71 | " |
| 72 | 72 | ||
| 73 | EXTRA_OECMAKE_append_class-nativesdk = "\ | 73 | EXTRA_OECMAKE_append_class-nativesdk = "\ |
| 74 | -DCMAKE_CROSSCOMPILING:BOOL=ON \ | 74 | -DCMAKE_CROSSCOMPILING:BOOL=ON \ |
| 75 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | 75 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ |
| 76 | " | 76 | " |
| 77 | 77 | ||
| 78 | do_configure_prepend() { | 78 | do_configure_prepend() { |
| @@ -87,12 +87,12 @@ do_compile() { | |||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | do_compile_class-native() { | 89 | do_compile_class-native() { |
| 90 | NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-tblgen | 90 | NINJA_STATUS="[%p] " ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | do_install() { | 93 | do_install() { |
| 94 | NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install | 94 | NINJA_STATUS="[%p] " DESTDIR=${LLVM_INSTALL_DIR} ninja -v install |
| 95 | install -D -m 0755 ${B}/NATIVE/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config-host | 95 | install -D -m 0755 ${B}/bin/llvm-config ${D}${libdir}/${LLVM_DIR}/llvm-config |
| 96 | 96 | ||
| 97 | install -d ${D}${bindir}/${LLVM_DIR} | 97 | install -d ${D}${bindir}/${LLVM_DIR} |
| 98 | cp -r ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/ | 98 | cp -r ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/ |
| @@ -121,7 +121,9 @@ do_install() { | |||
| 121 | rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so | 121 | rm -rf ${D}${libdir}/${LLVM_DIR}/libLTO.so |
| 122 | } | 122 | } |
| 123 | do_install_class-native() { | 123 | do_install_class-native() { |
| 124 | install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen | 124 | install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} |
| 125 | install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV} | ||
| 126 | install -D -m 0755 ${B}/lib/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so | ||
| 125 | } | 127 | } |
| 126 | 128 | ||
| 127 | PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello" | 129 | PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello" |
| @@ -134,14 +136,14 @@ FILES_${PN}-dbg = " \ | |||
| 134 | ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \ | 136 | ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \ |
| 135 | ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \ | 137 | ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \ |
| 136 | ${libdir}/${LLVM_DIR}/.debug/libLTO.so* \ | 138 | ${libdir}/${LLVM_DIR}/.debug/libLTO.so* \ |
| 137 | ${libdir}/${LLVM_DIR}/.debug/llvm-config-host \ | 139 | ${libdir}/${LLVM_DIR}/.debug/llvm-config \ |
| 138 | /usr/src/debug \ | 140 | /usr/src/debug \ |
| 139 | " | 141 | " |
| 140 | 142 | ||
| 141 | FILES_${PN}-dev = " \ | 143 | FILES_${PN}-dev = " \ |
| 142 | ${bindir}/${LLVM_DIR} \ | 144 | ${bindir}/${LLVM_DIR} \ |
| 143 | ${includedir}/${LLVM_DIR} \ | 145 | ${includedir}/${LLVM_DIR} \ |
| 144 | ${libdir}/${LLVM_DIR}/llvm-config-host \ | 146 | ${libdir}/${LLVM_DIR}/llvm-config \ |
| 145 | " | 147 | " |
| 146 | 148 | ||
| 147 | RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello" | 149 | 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" | |||
| 25 | PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \ | 25 | PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \ |
| 26 | ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)}" | 26 | ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)}" |
| 27 | 27 | ||
| 28 | export LLVM_CONFIG = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config-host" | 28 | export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}" |
| 29 | 29 | export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config" | |
| 30 | EXTRA_OECONF = "--enable-shared-glapi \ | 30 | EXTRA_OECONF = "--enable-shared-glapi \ |
| 31 | --disable-opencl \ | 31 | --disable-opencl \ |
| 32 | --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \ | 32 | --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \ |
