classes: make TOOLCHAIN more permissive for kernel
PATCH 1/1 classes: make TOOLCHAIN more permissive for kernel
Currently TOOLCHAIN is strictly set to gcc in kernel-arch.bbclass. And this prevents any TOOLCHAIN changes for any kernel recipe. This change makes TOOLCHAIN configurable as usual.
--- meta/classes-recipe/kernel-arch.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/kernel-arch.bbclass +1 -1
@@ -70,5 +70,5 @@ HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}" KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} -fdebug-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH}" KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}" KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}" -TOOLCHAIN = "gcc" +TOOLCHAIN ?= "gcc"
Signature · 1 line
2.30.2
Review
Quoted 2 lines · Alexey Smirnov via lists.openembedded.org
(quoted diff) +1
-1-TOOLCHAIN = "gcc" +TOOLCHAIN ?= “gcc"
If the kernel is buildable with clang then the TOOLCHAIN statement should just be removed.
Ross
Quoted 6 lines · Ross Burton
Review
Quoted 2 lines · Alexey Smirnov via lists.openembedded.org
(quoted diff) +1
-1-TOOLCHAIN = "gcc" +TOOLCHAIN ?= “gcc"If the kernel is buildable with clang then the TOOLCHAIN statement should just be removed.
It is buildable but the generated binary is not necessarily bootable, depending on the architecture
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 14 lines · Alexandre Belloni
Quoted 6 lines · Ross Burton
Review
Quoted 2 lines · Alexey Smirnov via lists.openembedded.org
(quoted diff) +1
-1-TOOLCHAIN = "gcc" +TOOLCHAIN ?= “gcc"If the kernel is buildable with clang then the TOOLCHAIN statement should just be removed.
It is buildable but the generated binary is not necessarily bootable, depending on the architecture
So maybe the kernel class should just set TOOLCHAIN for those architectures where it is known to not work, leaving it unset (and thus overridable with a global assignment) for everything else?
Ross
Quoted 12 lines · Ross Burton
Quoted 12 lines · Alexandre Belloni
Quoted 6 lines · Ross Burton
Review
Quoted 2 lines · Alexey Smirnov via lists.openembedded.org
(quoted diff) +1
-1-TOOLCHAIN = "gcc" +TOOLCHAIN ?= “gcc"If the kernel is buildable with clang then the TOOLCHAIN statement should just be removed.
Quoted 5 lines
Quoted 2 lines
It is buildable but the generated binary is not necessarily bootable, depending on the architecture
So maybe the kernel class should just set TOOLCHAIN for those architectures where it is known to not work, leaving it unset (and thus overridable with a global assignment) for everything else?
I'm not sure this is doable because oe-core doesn't have support for all the architectures that are supported by the kernel and so it would be better to list the ones that are actually supporting clang. Even then we will probably end up with people wanting to build with clang just to ensure there are no new warnings even if the kernel they are going to use is built with gcc (I've already been asked).
Quoted 11 lines
Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#174059): https://lists.openembedded.org/g/openembedded-core/message/174059
Mute This Topic: https://lists.openembedded.org/mt/95361461/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com