kernel: set COMPATIBLE_HOST to *-linux
PATCH 1/1 kernel: set COMPATIBLE_HOST to *-linux
The target system triple contains whether the target is Linux or not, so use it to avoid situations where you can attempt to build a kernel for systems which don't support Linux.
--- meta/classes/kernel.bbclass | 2 ++ meta/recipes-kernel/linux/linux-dummy.bb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
meta/classes/kernel.bbclass +2 -0
@@ -1,5 +1,7 @@ inherit linux-kernel-base kernel-module-split +COMPATIBLE_HOST = ".*-linux" + KERNEL_PACKAGE_NAME ??= "kernel" KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
meta/recipes-kernel/linux/linux-dummy.bb +1 -1
@@ -26,7 +26,7 @@ DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package" INHIBIT_DEFAULT_DEPS = "1" -#COMPATIBLE_MACHINE = "your_machine" +COMPATIBLE_HOST = ".*-linux" PR = "r1"
Signature · 1 line
2.25.1
Quoted 15 lines · Ross Burton
The target system triple contains whether the target is Linux or not, so use it to avoid situations where you can attempt to build a kernel for systems which don't support Linux.
Signed-off-by Ross Burton <[email protected]>--- meta/classes/kernel.bbclass | 2 ++ meta/recipes-kernel/linux/linux-dummy.bb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)meta/classes/kernel.bbclass +0
-0
meta/classes/kernel.bbclass line 3
Quoted 3 lines
meta/classes/kernel.bbclass +1
-0@@ -1,5 +1,7 @@ inherit linux-kernel-base kernel-module-split +COMPATIBLE_HOST = ".*-linux"
does this cover linux-gnueabi and such tuples too ?
Quoted 22 lines
meta/classes/kernel.bbclass +1
-0+ KERNEL_PACKAGE_NAME ??= "kernel" KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"meta/recipes-kernel/linux/linux-dummy.bb +1
-1@@ -26,7 +26,7 @@ DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package" INHIBIT_DEFAULT_DEPS = "1" -#COMPATIBLE_MACHINE = "your_machine" +COMPATIBLE_HOST = ".*-linux" PR = "r1"
Quoted 3 lines · Khem Raj
Quoted 1 line
+COMPATIBLE_HOST = ".*-linux"
does this cover linux-gnueabi and such tuples too ?
Maybe? Depends on the matching in anchored. If it does by accident then explicitly matching would be better. What machine has a triple like that for testing?
Ross
Quoted 9 lines · Ross Burton
Quoted 3 lines · Khem Raj
Quoted 1 line
+COMPATIBLE_HOST = ".*-linux"
does this cover linux-gnueabi and such tuples too ?
Maybe? Depends on the matching in anchored. If it does by accident then explicitly matching would be better. What machine has a triple like that for testing?
Most arm machines I think? :)
It is unanchored, something which I have to wonder about. I also don't like the overhead adding COMPATIBLE_* adds but I guess we just have to live with that :(.
Cheers,
Richard
Quoted 5 lines · Richard Purdie
Quoted 3 lines
Maybe? Depends on the matching in anchored. If it does by accident then explicitly matching would be better. What machine has a triple like that for testing?
Most arm machines I think? :)
Only old ones, which are dead to me. ;)
Quoted 3 lines
It is unanchored, something which I have to wonder about. I also don't like the overhead adding COMPATIBLE_* adds but I guess we just have to live with that :(.
So prior art in meta:
meta/recipes-core/systemd/systemd-boot_246.6.bb:COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" meta/recipes-devtools/dmidecode/dmidecode_3.3.bb:COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux" meta/recipes-devtools/gcc/gcc-sanitizers.inc:COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64).*-linux' meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb:COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)' meta/recipes-devtools/valgrind/valgrind_3.16.1.bb:COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
35 users in total and none are anchored, they all implicitly let the expression match -linux-gnueabi.
Ross