Skip to contentSkip to conversation

llvm: extend llvm-config reproducivility fix to all classes

PATCH Superseded Denys Dmytriyenko 2 participants 4 messages Jul 16, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 llvm: extend llvm-config reproducivility fix to all classes

It's not limited to "target", but also happens to e.g. nativesdk:

ERROR: nativesdk-llvm-18.1.8-r0 do_package_qa: QA Issue: File /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/llvm-config in package nativesdk-llvm contains reference to TMPDIR [buildpaths]

---
 meta/recipes-devtools/llvm/llvm_18.1.8.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/llvm/llvm_18.1.8.bb +1 -1
index 8dad952923..6afca9c7d7 100644
@@ -95,7 +95,7 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
                  "
 
 # patch out build host paths for reproducibility
-do_compile:prepend:class-target() {
+do_compile:prepend() {
         sed -i -e "s,${WORKDIR},,g" ${B}/tools/llvm-config/BuildVariables.inc
 }
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 23 lines · Denys Dmytriyenko via lists.openembedded.org

It's not limited to "target", but also happens to e.g. nativesdk:

ERROR: nativesdk-llvm-18.1.8-r0 do_package_qa: QA Issue: File /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk- linux/usr/bin/llvm-config in package nativesdk-llvm contains reference to TMPDIR [buildpaths]

---
 meta/recipes-devtools/llvm/llvm_18.1.8.bb | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/llvm/llvm_18.1.8.bb +0 -0
index 8dad952923..6afca9c7d7 100644
@@ -95,7 +95,7 @@ EXTRA_OECMAKE:append:class-nativesdk = "\

                  "

 # patch out build host paths for reproducibility
meta/recipes-devtools/llvm/llvm_18.1.8.bb +1 -1
-do_compile:prepend:class-target() {
+do_compile:prepend() {
Quoted 4 lines

         sed -i -e "s,${WORKDIR},,g" ${B}/tools/llvm- config/BuildVariables.inc
 }

Do we need those buildpaths in llvm-native?

Cheers,

Richard

#2 lore raw
Quoted 24 lines · Richard Purdie
Quoted 22 lines · Denys Dmytriyenko via lists.openembedded.org

It's not limited to "target", but also happens to e.g. nativesdk:

ERROR: nativesdk-llvm-18.1.8-r0 do_package_qa: QA Issue: File /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk- linux/usr/bin/llvm-config in package nativesdk-llvm contains reference to TMPDIR [buildpaths]

---
 meta/recipes-devtools/llvm/llvm_18.1.8.bb | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/llvm/llvm_18.1.8.bb +0 -0
index 8dad952923..6afca9c7d7 100644
@@ -95,7 +95,7 @@ EXTRA_OECMAKE:append:class-nativesdk = "\

                  "

 # patch out build host paths for reproducibility
-do_compile:prepend:class-target() {
Quoted 8 lines
Quoted 5 lines

+do_compile:prepend() {
         sed -i -e "s,${WORKDIR},,g" ${B}/tools/llvm- config/BuildVariables.inc
 }

Do we need those buildpaths in llvm-native?

I'm not really sure, but I can spin up a v2.

Signature · 1 line
Denys
#3 lore raw
Quoted 34 lines · Denys Dmytriyenko via lists.openembedded.org
Quoted 24 lines · Richard Purdie
Quoted 22 lines · Denys Dmytriyenko via lists.openembedded.org

It's not limited to "target", but also happens to e.g. nativesdk:

ERROR: nativesdk-llvm-18.1.8-r0 do_package_qa: QA Issue: File /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk- linux/usr/bin/llvm-config in package nativesdk-llvm contains reference to TMPDIR [buildpaths]

---
 meta/recipes-devtools/llvm/llvm_18.1.8.bb | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/llvm/llvm_18.1.8.bb +0 -0
index 8dad952923..6afca9c7d7 100644
@@ -95,7 +95,7 @@ EXTRA_OECMAKE:append:class-nativesdk = "\

                  "

 # patch out build host paths for reproducibility
-do_compile:prepend:class-target() {
Quoted 8 lines
Quoted 5 lines

+do_compile:prepend() {
         sed -i -e "s,${WORKDIR},,g" ${B}/tools/llvm- config/BuildVariables.inc
 }

Do we need those buildpaths in llvm-native?

Quoted 1 line

I'm not really sure, but I can spin up a v2.

I'm just not sure if that is going to break something or not in the native case. I worry a bit that it might :(

Cheers,

Richard