diff mbox series

[1/2] llvm: doesn't actually need pythonnative

Message ID 20190327230712.4930-1-ross.burton@intel.com
State Accepted
Commit 1587475e45edc995b7643844594abc94160a5549
Headers show
Series [1/2] llvm: doesn't actually need pythonnative | expand

Commit Message

Ross Burton March 27, 2019, 11:07 p.m. UTC
LLVM doesn't actually need pythonnative, the host Python2 is sufficient but
cmake's executable searching currently isn't reliable in cross-compilations.

Convince cmake by setting PYTHON_EXECUTABLE to point at python2 in the HOSTTOOLS
directory.  Note that currently LLVM *needs* python2 currently:

https://github.com/llvm-mirror/llvm/blob/master/CMakeLists.txt#L670

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/recipes-devtools/llvm/llvm_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Khem Raj March 29, 2019, 4:21 a.m. UTC | #1
On Wed, Mar 27, 2019 at 4:07 PM Ross Burton <ross.burton@intel.com> wrote:
>

> LLVM doesn't actually need pythonnative, the host Python2 is sufficient but

> cmake's executable searching currently isn't reliable in cross-compilations.

>

> Convince cmake by setting PYTHON_EXECUTABLE to point at python2 in the HOSTTOOLS

> directory.  Note that currently LLVM *needs* python2 currently:

>


this should be ok

> https://github.com/llvm-mirror/llvm/blob/master/CMakeLists.txt#L670

>

> Signed-off-by: Ross Burton <ross.burton@intel.com>

> ---

>  meta/recipes-devtools/llvm/llvm_git.bb | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

>

> diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb

> index d2ea927651d..31abadcace5 100644

> --- a/meta/recipes-devtools/llvm/llvm_git.bb

> +++ b/meta/recipes-devtools/llvm/llvm_git.bb

> @@ -12,7 +12,7 @@ DEPENDS = "libffi libxml2 zlib ninja-native llvm-native"

>

>  RDEPENDS_${PN}_append_class-target = " ncurses-terminfo"

>

> -inherit perlnative pythonnative cmake pkgconfig

> +inherit perlnative cmake pkgconfig

>

>  PROVIDES += "llvm${PV}"

>

> @@ -74,6 +74,7 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \

>                    -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \

>                    -DLLVM_OPTIMIZED_TABLEGEN=ON \

>                    -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS}' \

> +                  -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python2 \

>                    -G Ninja"

>

>  EXTRA_OECMAKE_append_class-target = "\

> --

> 2.11.0

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index d2ea927651d..31abadcace5 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -12,7 +12,7 @@  DEPENDS = "libffi libxml2 zlib ninja-native llvm-native"
 
 RDEPENDS_${PN}_append_class-target = " ncurses-terminfo"
 
-inherit perlnative pythonnative cmake pkgconfig
+inherit perlnative cmake pkgconfig
 
 PROVIDES += "llvm${PV}"
 
@@ -74,6 +74,7 @@  EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
                   -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
                   -DLLVM_OPTIMIZED_TABLEGEN=ON \
                   -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS}' \
+                  -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python2 \
                   -G Ninja"
 
 EXTRA_OECMAKE_append_class-target = "\