Skip to contentSkip to conversation

llvm: doesn't actually need pythonnative

PATCH In review Ross Burton 2 participants 3 messages Mar 27, 2019 – Mar 29, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 llvm: doesn't actually need pythonnative

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

---
 meta/recipes-devtools/llvm/llvm_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/llvm/llvm_git.bb +2 -1
index d2ea927651d..31abadcace5 100644
@@ -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 = "\
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 llvm: don't inherit perlnative

This doesn't appear to be required at all.

---
 meta/recipes-devtools/llvm/llvm_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/llvm/llvm_git.bb +1 -1
index 31abadcace5..2a8cd4a3e4e 100644
@@ -12,7 +12,7 @@ DEPENDS = "libffi libxml2 zlib ninja-native llvm-native"
 
 RDEPENDS_${PN}_append_class-target = " ncurses-terminfo"
 
-inherit perlnative cmake pkgconfig
+inherit cmake pkgconfig
 
 PROVIDES += "llvm${PV}"
 
Signature · 1 line
2.11.0
#2 lore raw
In reply to Ross Burton
Quoted 7 lines · Ross Burton

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

Quoted 36 lines

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

---
 meta/recipes-devtools/llvm/llvm_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-devtools/llvm/llvm_git.bb +2 -2
index d2ea927651d..31abadcace5 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core