Skip to contentSkip to conversation

make-mod-scripts: pass CROSS_COMPILE to configure and build

PATCH In review Denys Dmytriyenko 5 participants 8 messages Apr 1, 2021 – Nov 25, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make-mod-scripts: pass CROSS_COMPILE to configure and build

Fixes:

|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/checksyscalls.sh
|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/atomic/check-atomics.sh
|   LDS     arch/arm64/kernel/vdso/vdso.lds
|   CC      arch/arm64/kernel/vdso/vgettimeofday.o
|   AS      arch/arm64/kernel/vdso/note.o
|   AS      arch/arm64/kernel/vdso/sigreturn.o
|   LD      arch/arm64/kernel/vdso/vdso.so.dbg
|   VDSOSYM include/generated/vdso-offsets.h
|   OBJCOPY arch/arm64/kernel/vdso/vdso.so
| objcopy: Unable to recognise the format of the input file `arch/arm64/kernel/vdso/vdso.so.dbg'
| /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/arch/arm64/kernel/vdso/Makefile:61: recipe for target 'arch/arm64/kernel/vdso/vdso.so' failed
Cc Bruce Ashfield <[email protected]>
Cc Nishanth Menon <[email protected]>
---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +1 -1
index 92ffa47..b2b50b9 100644
@@ -19,7 +19,7 @@ DEPENDS += "bc-native bison-native"
 DEPENDS += "gmp-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
-EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
 
 # Build some host tools under work-shared.  CC, LD, and AR are probably
 # not used, but this is the historical way of invoking "make scripts".
Signature · 1 line
2.7.4
Reviewed-by Acked-by Tested-by on v1 1/1
#1 lore raw
Quoted 14 lines · Denys Dmytriyenko

Fixes:

|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/checksyscalls.sh
|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/atomic/check-atomics.sh
|   LDS     arch/arm64/kernel/vdso/vdso.lds
|   CC      arch/arm64/kernel/vdso/vgettimeofday.o
|   AS      arch/arm64/kernel/vdso/note.o
|   AS      arch/arm64/kernel/vdso/sigreturn.o
|   LD      arch/arm64/kernel/vdso/vdso.so.dbg
|   VDSOSYM include/generated/vdso-offsets.h
|   OBJCOPY arch/arm64/kernel/vdso/vdso.so
| objcopy: Unable to recognise the format of the input file `arch/arm64/kernel/vdso/vdso.so.dbg'
| /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/arch/arm64/kernel/vdso/Makefile:61: recipe for target 'arch/arm64/kernel/vdso/vdso.so' failed
Quoted 1 line
Cc Bruce Ashfield <[email protected]>

I like the lighter touch of this patch. I still can't explain why this isn't necessary on one of my builders, but is on the other .. but that of course isn't relevant to this!

I've reviewed and tested this, so no concerns from my end.

Queue the cheesy -by lines:

Quoted 22 lines
---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +1 -2
index 92ffa47..b2b50b9 100644
@@ -19,7 +19,7 @@ DEPENDS += "bc-native bison-native"
 DEPENDS += "gmp-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
-EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
 
 # Build some host tools under work-shared.  CC, LD, and AR are probably
 # not used, but this is the historical way of invoking "make scripts".
--

2.7.4

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
Tested-by
#2 lore raw
Quoted 21 lines · Bruce Ashfield
Quoted 14 lines · Denys Dmytriyenko

Fixes:

|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/checksyscalls.sh
|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/atomic/check-atomics.sh
|   LDS     arch/arm64/kernel/vdso/vdso.lds
|   CC      arch/arm64/kernel/vdso/vgettimeofday.o
|   AS      arch/arm64/kernel/vdso/note.o
|   AS      arch/arm64/kernel/vdso/sigreturn.o
|   LD      arch/arm64/kernel/vdso/vdso.so.dbg
|   VDSOSYM include/generated/vdso-offsets.h
|   OBJCOPY arch/arm64/kernel/vdso/vdso.so
| objcopy: Unable to recognise the format of the input file `arch/arm64/kernel/vdso/vdso.so.dbg'
| /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/arch/arm64/kernel/vdso/Makefile:61: recipe for target 'arch/arm64/kernel/vdso/vdso.so' failed
Quoted 1 line
Cc Bruce Ashfield <[email protected]>

I like the lighter touch of this patch. I still can't explain why this isn't necessary on one of my builders, but is on the other .. but that of course isn't relevant to this!

Quoted 8 lines

I've reviewed and tested this, so no concerns from my end.

Queue the cheesy -by lines:

Sounds good to me as well.. Thanks for discussing this chain[1].

Though I still don't understand the rationale why would we not move CROSS_COMPILE from kernel.bbclass to kernel-arch.bbclass instead of having to duplicate it here? after all KERNEL_CC etc are in that realm and would'nt CROSS_COMPILE fall in that bucket?

Quoted 28 lines
Quoted 22 lines
---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +1 -2
index 92ffa47..b2b50b9 100644
@@ -19,7 +19,7 @@ DEPENDS += "bc-native bison-native"
 DEPENDS += "gmp-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
-EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
 
 # Build some host tools under work-shared.  CC, LD, and AR are probably
 # not used, but this is the historical way of invoking "make scripts".
--

2.7.4

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
Signature · 5 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

[1] https://lists.openembedded.org/g/openembedded-core/message/150143
#3 lore raw
Quoted 35 lines · Nishanth Menon
Quoted 21 lines · Bruce Ashfield
Quoted 14 lines · Denys Dmytriyenko

Fixes:

|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/checksyscalls.sh
|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/atomic/check-atomics.sh
|   LDS     arch/arm64/kernel/vdso/vdso.lds
|   CC      arch/arm64/kernel/vdso/vgettimeofday.o
|   AS      arch/arm64/kernel/vdso/note.o
|   AS      arch/arm64/kernel/vdso/sigreturn.o
|   LD      arch/arm64/kernel/vdso/vdso.so.dbg
|   VDSOSYM include/generated/vdso-offsets.h
|   OBJCOPY arch/arm64/kernel/vdso/vdso.so
| objcopy: Unable to recognise the format of the input file `arch/arm64/kernel/vdso/vdso.so.dbg'
| /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/arch/arm64/kernel/vdso/Makefile:61: recipe for target 'arch/arm64/kernel/vdso/vdso.so' failed
Quoted 1 line
Cc Bruce Ashfield <[email protected]>

I like the lighter touch of this patch. I still can't explain why this isn't necessary on one of my builders, but is on the other .. but that of course isn't relevant to this!

Quoted 8 lines

I've reviewed and tested this, so no concerns from my end.

Queue the cheesy -by lines:

Sounds good to me as well.. Thanks for discussing this chain[1].

Quoted 7 lines

Though I still don't understand the rationale why would we not move CROSS_COMPILE from kernel.bbclass to kernel-arch.bbclass instead of having to duplicate it here? after all KERNEL_CC etc are in that realm and would'nt CROSS_COMPILE fall in that bucket?

It is definitely a valid thing to do as well.

My only hesitation is the timing. We are very close to release, so I'd prefer the lightest touch fix, which is this one.

We can of course revisit in about a month when the release is out.

Bruce

Quoted 36 lines
Quoted 18 lines
Quoted 18 lines
---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +1 -1
index 92ffa47..b2b50b9 100644
@@ -19,7 +19,7 @@ DEPENDS += "bc-native bison-native"
 DEPENDS += "gmp-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
-EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
 
Quoted 11 lines
Quoted 5 lines
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +0 -1
 # Build some host tools under work-shared.  CC, LD, and AR are probably
 # not used, but this is the historical way of invoking "make scripts".
--

2.7.4

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

[1] https://lists.openembedded.org/g/openembedded-core/message/150143

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#4 lore raw

On 16:52-20210401, Bruce Ashfield wrote:
[...]

Quoted 11 lines
Quoted 4 lines

Though I still don't understand the rationale why would we not move CROSS_COMPILE from kernel.bbclass to kernel-arch.bbclass instead of having to duplicate it here? after all KERNEL_CC etc are in that realm and would'nt CROSS_COMPILE fall in that bucket?

It is definitely a valid thing to do as well.

My only hesitation is the timing. We are very close to release, so I'd prefer the lightest touch fix, which is this one.

We can of course revisit in about a month when the release is out.

Aah, thanks.. understood. And, thanks for looking closer at this.

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#5 lore raw
In reply to Denys Dmytriyenko

Bruce, Steve,

Quoted 13 lines · Denys Dmytriyenko

Fixes:
| CALL
/OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/checksyscalls.sh
| CALL
/OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/atomic/check-atomics.sh

|   LDS     arch/arm64/kernel/vdso/vdso.lds
|   CC      arch/arm64/kernel/vdso/vgettimeofday.o
|   AS      arch/arm64/kernel/vdso/note.o
|   AS      arch/arm64/kernel/vdso/sigreturn.o
|   LD      arch/arm64/kernel/vdso/vdso.so.dbg
|   VDSOSYM include/generated/vdso-offsets.h
|   OBJCOPY arch/arm64/kernel/vdso/vdso.so
| objcopy: Unable to recognise the format of the input file
Quoted 5 lines

`arch/arm64/kernel/vdso/vdso.so.dbg'
| /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/arch/arm64/kernel/vdso/Makefile:61:
recipe for target 'arch/arm64/kernel/vdso/vdso.so' failed

One of our meta-qcom users hit this issue with dunfell
https://github.com/ndechesne/meta-qcom/issues/394

Backporting this patch to dunfell seems the right thing to do. The patch applies cleanly and it fixes the problem for me.

e.g.
ddad8183490c (make-mod-scripts: pass CROSS_COMPILE to configure and build)

Feel free to add

Quoted 39 lines
Cc Bruce Ashfield <[email protected]>
Cc Nishanth Menon <[email protected]>
---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +0 -0
index 92ffa47..b2b50b9 100644
@@ -19,7 +19,7 @@ DEPENDS += "bc-native bison-native"
 DEPENDS += "gmp-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"

HOSTCPP="${BUILD_CPP}""
-EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"

# Build some host tools under work-shared. CC, LD, and AR are probably

 # not used, but this is the historical way of invoking "make scripts".
--
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#150130):
https://lists.openembedded.org/g/openembedded-core/message/150130
Mute This Topic: https://lists.openembedded.org/mt/81764668/1279857
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw
Quoted 3 lines · Nicolas Dechesne

Bruce, Steve,

The backport is also fine with me!

Bruce

Quoted 62 lines · Denys Dmytriyenko
Quoted 13 lines

Fixes:

|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/checksyscalls.sh
|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/atomic/check-atomics.sh
|   LDS     arch/arm64/kernel/vdso/vdso.lds
|   CC      arch/arm64/kernel/vdso/vgettimeofday.o
|   AS      arch/arm64/kernel/vdso/note.o
|   AS      arch/arm64/kernel/vdso/sigreturn.o
|   LD      arch/arm64/kernel/vdso/vdso.so.dbg
|   VDSOSYM include/generated/vdso-offsets.h
|   OBJCOPY arch/arm64/kernel/vdso/vdso.so
| objcopy: Unable to recognise the format of the input file `arch/arm64/kernel/vdso/vdso.so.dbg'
| /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/arch/arm64/kernel/vdso/Makefile:61: recipe for target 'arch/arm64/kernel/vdso/vdso.so' failed

One of our meta-qcom users hit this issue with dunfell
https://github.com/ndechesne/meta-qcom/issues/394

Backporting this patch to dunfell seems the right thing to do. The patch applies cleanly and it fixes the problem for me.

e.g.
ddad8183490c (make-mod-scripts: pass CROSS_COMPILE to configure and build)

Feel free to add

Quoted 33 lines
Cc Bruce Ashfield <[email protected]>
Cc Nishanth Menon <[email protected]>
---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +1 -2
index 92ffa47..b2b50b9 100644
@@ -19,7 +19,7 @@ DEPENDS += "bc-native bison-native"
 DEPENDS += "gmp-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
-EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
 
 # Build some host tools under work-shared.  CC, LD, and AR are probably
 # not used, but this is the historical way of invoking "make scripts".
--

2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#150130): https://lists.openembedded.org/g/openembedded-core/message/150130
Mute This Topic: https://lists.openembedded.org/mt/81764668/1279857
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#7 lore raw
Quoted 8 lines · Bruce Ashfield
Quoted 3 lines · Nicolas Dechesne

Bruce, Steve,

The backport is also fine with me!

OK, will do!

Steve

Quoted 74 lines

Bruce

Quoted 48 lines · Denys Dmytriyenko
Quoted 13 lines

Fixes:

|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/checksyscalls.sh
|   CALL    /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/scripts/atomic/check-atomics.sh
|   LDS     arch/arm64/kernel/vdso/vdso.lds
|   CC      arch/arm64/kernel/vdso/vgettimeofday.o
|   AS      arch/arm64/kernel/vdso/note.o
|   AS      arch/arm64/kernel/vdso/sigreturn.o
|   LD      arch/arm64/kernel/vdso/vdso.so.dbg
|   VDSOSYM include/generated/vdso-offsets.h
|   OBJCOPY arch/arm64/kernel/vdso/vdso.so
| objcopy: Unable to recognise the format of the input file `arch/arm64/kernel/vdso/vdso.so.dbg'
| /OE/poky-master/build/tmp/work-shared/qemuarm64/kernel-source/arch/arm64/kernel/vdso/Makefile:61: recipe for target 'arch/arm64/kernel/vdso/vdso.so' failed

One of our meta-qcom users hit this issue with dunfell
https://github.com/ndechesne/meta-qcom/issues/394

Backporting this patch to dunfell seems the right thing to do. The patch applies cleanly and it fixes the problem for me.

e.g.
ddad8183490c (make-mod-scripts: pass CROSS_COMPILE to configure and build)

Feel free to add

Quoted 19 lines
Cc Bruce Ashfield <[email protected]>
Cc Nishanth Menon <[email protected]>
---
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +1 -1
index 92ffa47..b2b50b9 100644
@@ -19,7 +19,7 @@ DEPENDS += "bc-native bison-native"
 DEPENDS += "gmp-native"
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
-EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
 
Quoted 8 lines
Quoted 8 lines
meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +0 -1
 # Build some host tools under work-shared.  CC, LD, and AR are probably
 # not used, but this is the historical way of invoking "make scripts".
--

2.7.4

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#158785): https://lists.openembedded.org/g/openembedded-core/message/158785
Mute This Topic: https://lists.openembedded.org/mt/81764668/3617601
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-