Skip to contentSkip to conversation

llvm-common: move cross script install to sysroot preprocess function

PATCH In review Jonathan Liu 2 participants 4 messages Jun 12, 2013 – Jun 13, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 llvm-common: move cross script install to sysroot preprocess function

The llvm-config script doesn't get placed in the target sysroot crossscripts directory otherwise.

---
 meta-oe/recipes-core/llvm/llvm-common.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-core/llvm/llvm-common.bb +4 -1
index 612fd34..192919e 100644
@@ -6,7 +6,10 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 
 SRC_URI = "file://llvm-config"
 
-do_install() {
+ALLOW_EMPTY_${PN} = "1"
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_common_sysroot_preprocess"
+
+llvm_common_sysroot_preprocess() {
     install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
     install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
 }
Signature · 1 line
1.8.3
#1 lore raw
Quoted 14 lines · Jonathan Liu

The llvm-config script doesn't get placed in the target sysroot crossscripts directory otherwise.

---
 meta-oe/recipes-core/llvm/llvm-common.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-core/llvm/llvm-common.bb +0 -0
index 612fd34..192919e 100644
@@ -6,7 +6,10 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 

meta-oe/recipes-core/llvm/llvm-common.bb LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3 · line 15

Quoted 10 lines
meta-oe/recipes-core/llvm/llvm-common.bb +4 -1
 SRC_URI = "file://llvm-config"
 
-do_install() {
+ALLOW_EMPTY_${PN} = "1"
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_common_sysroot_preprocess"
+
+llvm_common_sysroot_preprocess() {
     install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
     install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
 }

There is an issue with llvm-config without version when multiple versions of llvm are built:

WARNING: The recipe llvm2.8 is trying to install files into a shared
area when those files already exist. Those files and their manifest
location are:
/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/sysroots/qemuarm/usr/bin/crossscripts/llvm-config Matched in manifest-qemuarm-llvm3.2
manifest-qemuarm-llvm2.9
manifest-qemuarm-llvm-common
Please verify which package should provide the above files.

Shouldn't we stage llvm-common only once and only from llvm-common recipe? Not caused by this change, but
http://patchwork.openembedded.org/patch/50959/

Other recipes can stage llvm-commonVER.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
Quoted 38 lines · Martin Jansa
Quoted 14 lines · Jonathan Liu

The llvm-config script doesn't get placed in the target sysroot crossscripts directory otherwise.

---
 meta-oe/recipes-core/llvm/llvm-common.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-core/llvm/llvm-common.bb +0 -0
index 612fd34..192919e 100644
@@ -6,7 +6,10 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 

meta-oe/recipes-core/llvm/llvm-common.bb LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3 · line 15

Quoted 10 lines
meta-oe/recipes-core/llvm/llvm-common.bb +4 -1
 SRC_URI = "file://llvm-config"
 
-do_install() {
+ALLOW_EMPTY_${PN} = "1"
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_common_sysroot_preprocess"
+
+llvm_common_sysroot_preprocess() {
     install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
     install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
 }

There is an issue with llvm-config without version when multiple versions of llvm are built:

WARNING: The recipe llvm2.8 is trying to install files into a shared
area when those files already exist. Those files and their manifest
location are:
/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/sysroots/qemuarm/usr/bin/crossscripts/llvm-config Matched in manifest-qemuarm-llvm3.2
manifest-qemuarm-llvm2.9
manifest-qemuarm-llvm-common
Please verify which package should provide the above files.

Quoted 5 lines

Shouldn't we stage llvm-common only once and only from llvm-common recipe? Not caused by this change, but
http://patchwork.openembedded.org/patch/50959/

Other recipes can stage llvm-commonVER.

I've merged other llvm changes except this one and similar for llvm.inc. I'm not using llvm on target (except llvmpipe), but shouldn't we keep llvm-config in do_install? To install llvm-configVER by llvm package in runtime as well as to bindir_crossscripts by llvm_common_sysroot_preprocess? (assuming that paths returned by llvm-configVER are correct for target - not pointing to sysroot).

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw
In reply to Martin Jansa
Quoted 37 lines · Martin Jansa
Quoted 14 lines · Jonathan Liu

The llvm-config script doesn't get placed in the target sysroot crossscripts directory otherwise.

---
  meta-oe/recipes-core/llvm/llvm-common.bb | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-core/llvm/llvm-common.bb +0 -0
index 612fd34..192919e 100644
@@ -6,7 +6,10 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 

meta-oe/recipes-core/llvm/llvm-common.bb LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3 · line 15

Quoted 10 lines
meta-oe/recipes-core/llvm/llvm-common.bb +4 -1
  SRC_URI = "file://llvm-config"
 
-do_install() {
+ALLOW_EMPTY_${PN} = "1"
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_common_sysroot_preprocess"
+
+llvm_common_sysroot_preprocess() {
      install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
      install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
  }

There is an issue with llvm-config without version when multiple versions of llvm are built:

WARNING: The recipe llvm2.8 is trying to install files into a shared
area when those files already exist. Those files and their manifest
location are:
/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/sysroots/qemuarm/usr/bin/crossscripts/llvm-config Matched in manifest-qemuarm-llvm3.2
manifest-qemuarm-llvm2.9
manifest-qemuarm-llvm-common
Please verify which package should provide the above files.

Quoted 3 lines

Shouldn't we stage llvm-common only once and only from llvm-common recipe? Not caused by this change, but
http://patchwork.openembedded.org/patch/50959/

That patch is to be ignored as indicated by my followup email 32 minutes after (see http://patchwork.openembedded.org/patch/50959/).

The only unmerged patches remaining:
- [PATCH v2] llvm: move cross script install to separate sysroot preprocess function
- [PATCH v3] llvm-common: move cross script install to sysroot preprocess function

With those two patches applied above the current meta-openembedded master, I can do the following in sequence without any issues:
bitbake llvm3.2
bitbake llvm2.9
bitbake llvm2.8

Regards,
Jonathan

Quoted 1 line

Other recipes can stage llvm-commonVER.