diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-10 14:45:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-21 23:09:33 +0000 |
commit | 90e0a0f7f4536e1aeb311ab2b061be71b4129e4e (patch) | |
tree | a8c5678389dcf034529921537322a6d929c619a3 | |
parent | 01c335432524f250ca806381ebcb8a208524eb34 (diff) | |
download | poky-90e0a0f7f4536e1aeb311ab2b061be71b4129e4e.tar.gz |
classes/recipes: Switch virtual/XXX-gcc to virtual/cross-cc (and c++/binutils)
The idea of the base class dependency is to say "yes, I need a C cross compiler"
and this was never meant to be gcc specific. Looking at the codebase, whilst we
code triplets into this, it does overcomplicate things as there are only ever
limited, "target", "sdk" and the class extended versions like mutlilib.
After much thought, we can simplify this to virtual/cross-cc and virtual/nativesdk-cross-cc.
This lets us remove the "gcc" specific element as well as removing the over
complicated triplet usage.
At the same time, change the much less widely used "g++" variant to "c++" for
similar reasons and remove the triplet from virtual/XXX-binutils too.
Backwards compatibility mappings could be left but are just going to confuse
things in future so we'll just require users to update.
This simplification, whilst disruptive for any toolchain focused layers, will
make improved toolchain selection in the future much easier.
Since we no longer have overlapping variables, some code for that can just
be removed. The class extension code does need to start remapping some variables
but not the crosssdk target recipe names.
This patch is in two pieces, this one handles the renaming with the functional
changes separate in a second for easier review even if this breaks bisection.
(From OE-Core rev: 4ccc3bc8266c327bcc18c9a3faf7536210dfb9f0)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
32 files changed, 60 insertions, 62 deletions
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index c8268abcdf..dbbf6cef8c 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass | |||
@@ -48,7 +48,7 @@ def get_base_dep(d): | |||
48 | return "" | 48 | return "" |
49 | return "${BASE_DEFAULT_DEPS}" | 49 | return "${BASE_DEFAULT_DEPS}" |
50 | 50 | ||
51 | BASE_DEFAULT_DEPS = "virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}compilerlibs virtual/libc" | 51 | BASE_DEFAULT_DEPS = "virtual/cross-cc virtual/compilerlibs virtual/libc" |
52 | 52 | ||
53 | BASEDEPENDS = "" | 53 | BASEDEPENDS = "" |
54 | BASEDEPENDS:class-target = "${@get_base_dep(d)}" | 54 | BASEDEPENDS:class-target = "${@get_base_dep(d)}" |
@@ -312,16 +312,6 @@ python base_eventhandler() { | |||
312 | if statusheader: | 312 | if statusheader: |
313 | bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines))) | 313 | bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines))) |
314 | 314 | ||
315 | # This code is to silence warnings where the SDK variables overwrite the | ||
316 | # target ones and we'd see duplicate key names overwriting each other | ||
317 | # for various PREFERRED_PROVIDERS | ||
318 | if isinstance(e, bb.event.RecipePreFinalise): | ||
319 | if d.getVar("TARGET_PREFIX") == d.getVar("SDK_PREFIX"): | ||
320 | d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils") | ||
321 | d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc") | ||
322 | d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++") | ||
323 | d.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs") | ||
324 | |||
325 | if isinstance(e, bb.event.RecipeParsed): | 315 | if isinstance(e, bb.event.RecipeParsed): |
326 | # | 316 | # |
327 | # If we have multiple providers of virtual/X and a PREFERRED_PROVIDER_virtual/X is set | 317 | # If we have multiple providers of virtual/X and a PREFERRED_PROVIDER_virtual/X is set |
diff --git a/meta/classes-global/staging.bbclass b/meta/classes-global/staging.bbclass index c2213ffa2b..1008867a6c 100644 --- a/meta/classes-global/staging.bbclass +++ b/meta/classes-global/staging.bbclass | |||
@@ -126,8 +126,8 @@ do_populate_sysroot[vardeps] += "${SYSROOT_PREPROCESS_FUNCS}" | |||
126 | do_populate_sysroot[vardepsexclude] += "BB_MULTI_PROVIDER_ALLOWED" | 126 | do_populate_sysroot[vardepsexclude] += "BB_MULTI_PROVIDER_ALLOWED" |
127 | 127 | ||
128 | POPULATESYSROOTDEPS = "" | 128 | POPULATESYSROOTDEPS = "" |
129 | POPULATESYSROOTDEPS:class-target = "virtual/${HOST_PREFIX}binutils:do_populate_sysroot" | 129 | POPULATESYSROOTDEPS:class-target = "virtual/cross-binutils:do_populate_sysroot" |
130 | POPULATESYSROOTDEPS:class-nativesdk = "virtual/${HOST_PREFIX}binutils:do_populate_sysroot" | 130 | POPULATESYSROOTDEPS:class-nativesdk = "virtual/nativesdk-cross-binutils:do_populate_sysroot" |
131 | do_populate_sysroot[depends] += "${POPULATESYSROOTDEPS}" | 131 | do_populate_sysroot[depends] += "${POPULATESYSROOTDEPS}" |
132 | 132 | ||
133 | SSTATETASKS += "do_populate_sysroot" | 133 | SSTATETASKS += "do_populate_sysroot" |
diff --git a/meta/classes-recipe/image_types_wic.bbclass b/meta/classes-recipe/image_types_wic.bbclass index 9a2996658a..1b422b6280 100644 --- a/meta/classes-recipe/image_types_wic.bbclass +++ b/meta/classes-recipe/image_types_wic.bbclass | |||
@@ -111,7 +111,7 @@ do_image_wic[deptask] += "do_image_complete" | |||
111 | WKS_FILE_DEPENDS_DEFAULT = '${@bb.utils.contains_any("BUILD_ARCH", [ 'x86_64', 'i686' ], "syslinux-native", "",d)}' | 111 | WKS_FILE_DEPENDS_DEFAULT = '${@bb.utils.contains_any("BUILD_ARCH", [ 'x86_64', 'i686' ], "syslinux-native", "",d)}' |
112 | WKS_FILE_DEPENDS_DEFAULT += "bmaptool-native cdrtools-native btrfs-tools-native squashfs-tools-native e2fsprogs-native erofs-utils-native" | 112 | WKS_FILE_DEPENDS_DEFAULT += "bmaptool-native cdrtools-native btrfs-tools-native squashfs-tools-native e2fsprogs-native erofs-utils-native" |
113 | # Unified kernel images need objcopy | 113 | # Unified kernel images need objcopy |
114 | WKS_FILE_DEPENDS_DEFAULT += "virtual/${TARGET_PREFIX}binutils" | 114 | WKS_FILE_DEPENDS_DEFAULT += "virtual/cross-binutils" |
115 | WKS_FILE_DEPENDS_BOOTLOADERS = "" | 115 | WKS_FILE_DEPENDS_BOOTLOADERS = "" |
116 | WKS_FILE_DEPENDS_BOOTLOADERS:x86 = "syslinux grub-efi systemd-boot os-release" | 116 | WKS_FILE_DEPENDS_BOOTLOADERS:x86 = "syslinux grub-efi systemd-boot os-release" |
117 | WKS_FILE_DEPENDS_BOOTLOADERS:x86-64 = "syslinux systemd-boot os-release" | 117 | WKS_FILE_DEPENDS_BOOTLOADERS:x86-64 = "syslinux systemd-boot os-release" |
diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass index 697132c073..c45abf6ddc 100644 --- a/meta/classes-recipe/kernel-yocto.bbclass +++ b/meta/classes-recipe/kernel-yocto.bbclass | |||
@@ -460,8 +460,8 @@ do_qa_unpack() { | |||
460 | return | 460 | return |
461 | } | 461 | } |
462 | 462 | ||
463 | do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}binutils:do_populate_sysroot" | 463 | do_kernel_configme[depends] += "virtual/cross-binutils:do_populate_sysroot" |
464 | do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot" | 464 | do_kernel_configme[depends] += "virtual/cross-cc:do_populate_sysroot" |
465 | do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot" | 465 | do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot" |
466 | do_kernel_configme[depends] += "kern-tools-native:do_populate_sysroot" | 466 | do_kernel_configme[depends] += "kern-tools-native:do_populate_sysroot" |
467 | do_kernel_configme[dirs] += "${S} ${B}" | 467 | do_kernel_configme[dirs] += "${S} ${B}" |
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index a7c4bf0ef4..0dd2e1e444 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass | |||
@@ -12,7 +12,7 @@ KERNEL_PACKAGE_NAME ??= "kernel" | |||
12 | KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }" | 12 | KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }" |
13 | 13 | ||
14 | PROVIDES += "virtual/kernel" | 14 | PROVIDES += "virtual/kernel" |
15 | DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native bison-native" | 15 | DEPENDS += "virtual/cross-binutils virtual/cross-cc kmod-native bc-native bison-native" |
16 | DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}" | 16 | DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}" |
17 | DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}" | 17 | DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}" |
18 | DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.zst", "zstd-native", "", d)}" | 18 | DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.zst", "zstd-native", "", d)}" |
diff --git a/meta/classes-recipe/uki.bbclass b/meta/classes-recipe/uki.bbclass index 441e4a7f8e..92f690526d 100644 --- a/meta/classes-recipe/uki.bbclass +++ b/meta/classes-recipe/uki.bbclass | |||
@@ -64,7 +64,7 @@ DEPENDS += "\ | |||
64 | os-release \ | 64 | os-release \ |
65 | systemd-boot \ | 65 | systemd-boot \ |
66 | systemd-boot-native \ | 66 | systemd-boot-native \ |
67 | virtual/${TARGET_PREFIX}binutils \ | 67 | virtual/cross-binutils \ |
68 | virtual/kernel \ | 68 | virtual/kernel \ |
69 | " | 69 | " |
70 | 70 | ||
diff --git a/meta/conf/distro/include/tclibc-baremetal.inc b/meta/conf/distro/include/tclibc-baremetal.inc index f3d27bbaae..abea5a7162 100644 --- a/meta/conf/distro/include/tclibc-baremetal.inc +++ b/meta/conf/distro/include/tclibc-baremetal.inc | |||
@@ -19,10 +19,10 @@ IMAGE_LINGUAS = "" | |||
19 | LIBC_DEPENDENCIES = "" | 19 | LIBC_DEPENDENCIES = "" |
20 | 20 | ||
21 | EXTRA_OECONF:pn-gcc-cross-${TARGET_ARCH}:append = " --without-headers" | 21 | EXTRA_OECONF:pn-gcc-cross-${TARGET_ARCH}:append = " --without-headers" |
22 | DEPENDS:remove:pn-meta-toolchain = "virtual/libc virtual/${TARGET_PREFIX}compilerlibs" | 22 | DEPENDS:remove:pn-meta-toolchain = "virtual/libc virtual/compilerlibs" |
23 | 23 | ||
24 | # certain compiler libs cannot be used without libc, avoid the dependence on compilerlibs | 24 | # certain compiler libs cannot be used without libc, avoid the dependence on compilerlibs |
25 | BASEDEPENDS:remove:class-target = "virtual/${TARGET_PREFIX}compilerlibs" | 25 | BASEDEPENDS:remove:class-target = "virtual/compilerlibs" |
26 | 26 | ||
27 | TARGET_OS = "elf" | 27 | TARGET_OS = "elf" |
28 | TARGET_OS:arm = "eabi" | 28 | TARGET_OS:arm = "eabi" |
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index c0817a2bf5..fa4028ceda 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc | |||
@@ -2,16 +2,20 @@ | |||
2 | # Default toolchain configuration | 2 | # Default toolchain configuration |
3 | # | 3 | # |
4 | 4 | ||
5 | PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross-${TARGET_ARCH}" | 5 | PREFERRED_PROVIDER_virtual/cross-binutils = "${MLPREFIX}binutils-cross-${TARGET_ARCH}" |
6 | PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "gcc-cross-${TARGET_ARCH}" | 6 | PREFERRED_PROVIDER_virtual/cross-cc = "${MLPREFIX}gcc-cross-${TARGET_ARCH}" |
7 | PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross-${TARGET_ARCH}" | 7 | PREFERRED_PROVIDER_virtual/cross-c++ = "${MLPREFIX}gcc-cross-${TARGET_ARCH}" |
8 | PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "gcc-runtime" | 8 | PREFERRED_PROVIDER_virtual/compilerlibs = "gcc-runtime" |
9 | PREFERRED_PROVIDER_gdb = "gdb" | 9 | PREFERRED_PROVIDER_gdb = "gdb" |
10 | 10 | ||
11 | PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils ?= "binutils-crosssdk-${SDK_SYS}" | 11 | PREFERRED_PROVIDER_virtual/cross-binutils:class-nativesdk ?= "binutils-crosssdk-${SDK_SYS}" |
12 | PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc = "gcc-crosssdk-${SDK_SYS}" | 12 | PREFERRED_PROVIDER_virtual/cross-cc:class-nativesdk = "gcc-crosssdk-${SDK_SYS}" |
13 | PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ = "gcc-crosssdk-${SDK_SYS}" | 13 | PREFERRED_PROVIDER_virtual/cross-c++:class-nativesdk = "gcc-crosssdk-${SDK_SYS}" |
14 | PREFERRED_PROVIDER_virtual/${SDK_PREFIX}compilerlibs = "nativesdk-gcc-runtime" | 14 | |
15 | PREFERRED_PROVIDER_virtual/nativesdk-cross-binutils ?= "binutils-crosssdk-${SDK_SYS}" | ||
16 | PREFERRED_PROVIDER_virtual/nativesdk-cross-cc = "gcc-crosssdk-${SDK_SYS}" | ||
17 | PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}" | ||
18 | PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime" | ||
15 | 19 | ||
16 | # Default libc config | 20 | # Default libc config |
17 | PREFERRED_PROVIDER_virtual/gettext ??= "gettext" | 21 | PREFERRED_PROVIDER_virtual/gettext ??= "gettext" |
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py index 5161d33d2d..8ae5d3b715 100644 --- a/meta/lib/oe/classextend.py +++ b/meta/lib/oe/classextend.py | |||
@@ -33,7 +33,7 @@ class ClassExtender(object): | |||
33 | name = name.replace("-" + self.extname, "") | 33 | name = name.replace("-" + self.extname, "") |
34 | if name.startswith("virtual/"): | 34 | if name.startswith("virtual/"): |
35 | # Assume large numbers of dashes means a triplet is present and we don't need to convert | 35 | # Assume large numbers of dashes means a triplet is present and we don't need to convert |
36 | if name.count("-") >= 3 and name.endswith(("-go", "-binutils", "-gcc", "-g++")): | 36 | if name.count("-") >= 3 and name.endswith(("-go",)): |
37 | return name | 37 | return name |
38 | subs = name.split("/", 1)[1] | 38 | subs = name.split("/", 1)[1] |
39 | if not subs.startswith(self.extname): | 39 | if not subs.startswith(self.extname): |
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index b08a70aa46..d8f20c87dd 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc | |||
@@ -1,7 +1,7 @@ | |||
1 | require glibc-common.inc | 1 | require glibc-common.inc |
2 | require glibc-ld.inc | 2 | require glibc-ld.inc |
3 | 3 | ||
4 | DEPENDS = "virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}binutils libgcc-initial linux-libc-headers" | 4 | DEPENDS = "virtual/cross-cc virtual/cross-binutils libgcc-initial linux-libc-headers" |
5 | 5 | ||
6 | PROVIDES = "virtual/libc" | 6 | PROVIDES = "virtual/libc" |
7 | PROVIDES += "virtual/libintl virtual/libiconv" | 7 | PROVIDES += "virtual/libintl virtual/libiconv" |
diff --git a/meta/recipes-core/meta/wic-tools.bb b/meta/recipes-core/meta/wic-tools.bb index 76494e7fca..fa983ed5f1 100644 --- a/meta/recipes-core/meta/wic-tools.bb +++ b/meta/recipes-core/meta/wic-tools.bb | |||
@@ -7,7 +7,7 @@ DEPENDS = "\ | |||
7 | mtools-native bmaptool-native grub-native cdrtools-native \ | 7 | mtools-native bmaptool-native grub-native cdrtools-native \ |
8 | btrfs-tools-native squashfs-tools-native pseudo-native \ | 8 | btrfs-tools-native squashfs-tools-native pseudo-native \ |
9 | e2fsprogs-native util-linux-native tar-native erofs-utils-native \ | 9 | e2fsprogs-native util-linux-native tar-native erofs-utils-native \ |
10 | virtual/${TARGET_PREFIX}binutils \ | 10 | virtual/cross-binutils \ |
11 | " | 11 | " |
12 | DEPENDS:append:x86 = " syslinux-native syslinux grub-efi systemd-boot" | 12 | DEPENDS:append:x86 = " syslinux-native syslinux grub-efi systemd-boot" |
13 | DEPENDS:append:x86-64 = " syslinux-native syslinux grub-efi systemd-boot" | 13 | DEPENDS:append:x86-64 = " syslinux-native syslinux grub-efi systemd-boot" |
diff --git a/meta/recipes-core/musl/libssp-nonshared.bb b/meta/recipes-core/musl/libssp-nonshared.bb index e9f652fc3e..fde3bc97b4 100644 --- a/meta/recipes-core/musl/libssp-nonshared.bb +++ b/meta/recipes-core/musl/libssp-nonshared.bb | |||
@@ -11,8 +11,8 @@ SRC_URI = "file://stack_chk.c" | |||
11 | 11 | ||
12 | INHIBIT_DEFAULT_DEPS = "1" | 12 | INHIBIT_DEFAULT_DEPS = "1" |
13 | 13 | ||
14 | DEPENDS = "virtual/${TARGET_PREFIX}binutils \ | 14 | DEPENDS = "virtual/cross-binutils \ |
15 | virtual/${TARGET_PREFIX}gcc \ | 15 | virtual/cross-cc \ |
16 | " | 16 | " |
17 | 17 | ||
18 | do_configure[noexec] = "1" | 18 | do_configure[noexec] = "1" |
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb index 1509c2e310..7a695e7e19 100644 --- a/meta/recipes-core/musl/musl_git.bb +++ b/meta/recipes-core/musl/musl_git.bb | |||
@@ -20,8 +20,8 @@ S = "${WORKDIR}/git" | |||
20 | 20 | ||
21 | PROVIDES += "virtual/libc virtual/libiconv virtual/libintl virtual/crypt" | 21 | PROVIDES += "virtual/libc virtual/libiconv virtual/libintl virtual/crypt" |
22 | 22 | ||
23 | DEPENDS = "virtual/${TARGET_PREFIX}binutils \ | 23 | DEPENDS = "virtual/cross-binutils \ |
24 | virtual/${TARGET_PREFIX}gcc \ | 24 | virtual/cross-cc \ |
25 | libgcc-initial \ | 25 | libgcc-initial \ |
26 | linux-libc-headers \ | 26 | linux-libc-headers \ |
27 | bsd-headers \ | 27 | bsd-headers \ |
diff --git a/meta/recipes-core/newlib/newlib.inc b/meta/recipes-core/newlib/newlib.inc index 34b0f3f747..668eaa9e96 100644 --- a/meta/recipes-core/newlib/newlib.inc +++ b/meta/recipes-core/newlib/newlib.inc | |||
@@ -20,7 +20,7 @@ SRC_URI = "git://sourceware.org/git/newlib-cygwin.git;protocol=https;branch=main | |||
20 | SRCREV="ad11e2587f83d61357a32c61c36d72ea4f39315e" | 20 | SRCREV="ad11e2587f83d61357a32c61c36d72ea4f39315e" |
21 | 21 | ||
22 | INHIBIT_DEFAULT_DEPS = "1" | 22 | INHIBIT_DEFAULT_DEPS = "1" |
23 | DEPENDS = "virtual/${TARGET_PREFIX}gcc" | 23 | DEPENDS = "virtual/cross-cc" |
24 | 24 | ||
25 | S = "${WORKDIR}/git" | 25 | S = "${WORKDIR}/git" |
26 | B = "${WORKDIR}/build" | 26 | B = "${WORKDIR}/build" |
diff --git a/meta/recipes-core/picolibc/picolibc_git.bb b/meta/recipes-core/picolibc/picolibc_git.bb index fdb159328f..e6735184cd 100644 --- a/meta/recipes-core/picolibc/picolibc_git.bb +++ b/meta/recipes-core/picolibc/picolibc_git.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | require picolibc.inc | 1 | require picolibc.inc |
2 | 2 | ||
3 | INHIBIT_DEFAULT_DEPS = "1" | 3 | INHIBIT_DEFAULT_DEPS = "1" |
4 | DEPENDS = "virtual/${TARGET_PREFIX}gcc" | 4 | DEPENDS = "virtual/cross-cc" |
5 | 5 | ||
6 | PROVIDES += "virtual/libc virtual/libiconv virtual/libintl" | 6 | PROVIDES += "virtual/libc virtual/libiconv virtual/libintl" |
7 | 7 | ||
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc index 62ebb3f5bc..c1fda1a465 100644 --- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc +++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc | |||
@@ -4,7 +4,7 @@ SUMMARY = "GNU binary utilities (cross-canadian for ${TARGET_ARCH} target)" | |||
4 | PN = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}" | 4 | PN = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}" |
5 | BPN = "binutils" | 5 | BPN = "binutils" |
6 | 6 | ||
7 | DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext nativesdk-flex" | 7 | DEPENDS = "flex-native bison-native virtual/nativesdk-cross-cc virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext nativesdk-flex" |
8 | EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \ | 8 | EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \ |
9 | --enable-poison-system-directories \ | 9 | --enable-poison-system-directories \ |
10 | " | 10 | " |
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc index 835d4fa69b..b908393c1f 100644 --- a/meta/recipes-devtools/binutils/binutils-cross.inc +++ b/meta/recipes-devtools/binutils/binutils-cross.inc | |||
@@ -1,5 +1,5 @@ | |||
1 | inherit cross | 1 | inherit cross |
2 | PROVIDES = "virtual/${TARGET_PREFIX}binutils" | 2 | PROVIDES = "virtual/cross-binutils" |
3 | 3 | ||
4 | PN = "binutils-cross-${TARGET_ARCH}" | 4 | PN = "binutils-cross-${TARGET_ARCH}" |
5 | BPN = "binutils" | 5 | BPN = "binutils" |
diff --git a/meta/recipes-devtools/binutils/binutils-crosssdk_2.43.1.bb b/meta/recipes-devtools/binutils/binutils-crosssdk_2.43.1.bb index 6752659304..b8c8ba9f58 100644 --- a/meta/recipes-devtools/binutils/binutils-crosssdk_2.43.1.bb +++ b/meta/recipes-devtools/binutils/binutils-crosssdk_2.43.1.bb | |||
@@ -1,5 +1,7 @@ | |||
1 | require binutils-cross_${PV}.bb | 1 | require binutils-cross_${PV}.bb |
2 | 2 | ||
3 | PROVIDES = "virtual/nativesdk-cross-binutils" | ||
4 | |||
3 | inherit crosssdk | 5 | inherit crosssdk |
4 | 6 | ||
5 | PN = "binutils-crosssdk-${SDK_SYS}" | 7 | PN = "binutils-crosssdk-${SDK_SYS}" |
diff --git a/meta/recipes-devtools/binutils/binutils-testsuite_2.43.1.bb b/meta/recipes-devtools/binutils/binutils-testsuite_2.43.1.bb index f2facd52c3..e5e159bc71 100644 --- a/meta/recipes-devtools/binutils/binutils-testsuite_2.43.1.bb +++ b/meta/recipes-devtools/binutils/binutils-testsuite_2.43.1.bb | |||
@@ -21,9 +21,9 @@ do_configure() { | |||
21 | } | 21 | } |
22 | 22 | ||
23 | # target depends | 23 | # target depends |
24 | DEPENDS += "virtual/${TARGET_PREFIX}binutils" | 24 | DEPENDS += "virtual/cross-binutils" |
25 | DEPENDS += "virtual/${TARGET_PREFIX}gcc" | 25 | DEPENDS += "virtual/cross-cc" |
26 | DEPENDS += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs" | 26 | DEPENDS += "virtual/${MLPREFIX}compilerlibs" |
27 | DEPENDS += "virtual/${MLPREFIX}libc" | 27 | DEPENDS += "virtual/${MLPREFIX}libc" |
28 | 28 | ||
29 | python check_prepare() { | 29 | python check_prepare() { |
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc index 01de93cc3c..de559eb9c3 100644 --- a/meta/recipes-devtools/gcc/gcc-common.inc +++ b/meta/recipes-devtools/gcc/gcc-common.inc | |||
@@ -11,7 +11,8 @@ CVE_PRODUCT = "gcc" | |||
11 | inherit autotools gettext texinfo | 11 | inherit autotools gettext texinfo |
12 | 12 | ||
13 | BPN = "gcc" | 13 | BPN = "gcc" |
14 | COMPILERDEP = "virtual/${TARGET_PREFIX}gcc:do_gcc_stash_builddir" | 14 | COMPILERDEP = "${MLPREFIX}gcc-cross-${TARGET_ARCH}:do_gcc_stash_builddir" |
15 | COMPILERDEP:class-nativesdk = "gcc-crosssdk-${SDK_SYS}:do_gcc_stash_builddir" | ||
15 | 16 | ||
16 | python extract_stashed_builddir () { | 17 | python extract_stashed_builddir () { |
17 | src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}") | 18 | src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}") |
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index bbe91ad0f9..9b55ec21e0 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc | |||
@@ -3,7 +3,7 @@ inherit cross-canadian | |||
3 | SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)" | 3 | SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)" |
4 | PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}" | 4 | PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}" |
5 | 5 | ||
6 | DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}binutils virtual/nativesdk-libc nativesdk-gettext flex-native virtual/libc" | 6 | DEPENDS = "virtual/nativesdk-cross-cc virtual/cross-cc virtual/nativesdk-cross-binutils virtual/nativesdk-libc nativesdk-gettext flex-native virtual/libc" |
7 | 7 | ||
8 | GCCMULTILIB = "--enable-multilib" | 8 | GCCMULTILIB = "--enable-multilib" |
9 | 9 | ||
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index f85ccd5c23..4549f92c2f 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc | |||
@@ -2,8 +2,8 @@ inherit cross | |||
2 | 2 | ||
3 | INHIBIT_DEFAULT_DEPS = "1" | 3 | INHIBIT_DEFAULT_DEPS = "1" |
4 | EXTRADEPENDS = "" | 4 | EXTRADEPENDS = "" |
5 | DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS} ${NATIVEDEPS}" | 5 | DEPENDS = "virtual/cross-binutils ${EXTRADEPENDS} ${NATIVEDEPS}" |
6 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" | 6 | PROVIDES = "virtual/cross-cc virtual/c++" |
7 | python () { | 7 | python () { |
8 | if d.getVar("TARGET_OS").startswith("linux"): | 8 | if d.getVar("TARGET_OS").startswith("linux"): |
9 | d.setVar("EXTRADEPENDS", "linux-libc-headers") | 9 | d.setVar("EXTRADEPENDS", "linux-libc-headers") |
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk.inc b/meta/recipes-devtools/gcc/gcc-crosssdk.inc index 7eaad2314c..4397dd898d 100644 --- a/meta/recipes-devtools/gcc/gcc-crosssdk.inc +++ b/meta/recipes-devtools/gcc/gcc-crosssdk.inc | |||
@@ -8,7 +8,7 @@ SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/" | |||
8 | 8 | ||
9 | GCCMULTILIB = "--disable-multilib" | 9 | GCCMULTILIB = "--disable-multilib" |
10 | 10 | ||
11 | DEPENDS = "virtual/${TARGET_PREFIX}binutils gettext-native ${NATIVEDEPS}" | 11 | DEPENDS = "virtual/nativesdk-cross-binutils gettext-native ${NATIVEDEPS}" |
12 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" | 12 | PROVIDES = "virtual/nativesdk-cross-cc virtual/nativesdk-cross-c++" |
13 | 13 | ||
14 | gcc_multilib_setup[vardepsexclude] = "MULTILIB_VARIANTS" | 14 | gcc_multilib_setup[vardepsexclude] = "MULTILIB_VARIANTS" |
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index 7afe34ebed..291ace2d09 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc | |||
@@ -156,8 +156,9 @@ do_install:append:class-target () { | |||
156 | } | 156 | } |
157 | 157 | ||
158 | INHIBIT_DEFAULT_DEPS = "1" | 158 | INHIBIT_DEFAULT_DEPS = "1" |
159 | DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc virtual/${MLPREFIX}libc" | 159 | DEPENDS = "virtual/cross-cc virtual/cross-c++ ${MLPREFIX}libgcc virtual/${MLPREFIX}libc" |
160 | PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs" | 160 | DEPENDS:class-nativesdk = "virtual/nativesdk-cross-cc virtual/nativesdk-cross-c++ ${MLPREFIX}libgcc virtual/${MLPREFIX}libc" |
161 | PROVIDES = "virtual/${MLPREFIX}compilerlibs" | ||
161 | 162 | ||
162 | BBCLASSEXTEND = "nativesdk" | 163 | BBCLASSEXTEND = "nativesdk" |
163 | 164 | ||
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc index 8c98e9cf8a..4163e87e1f 100644 --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc | |||
@@ -48,7 +48,7 @@ do_install () { | |||
48 | 48 | ||
49 | INHIBIT_DEFAULT_DEPS = "1" | 49 | INHIBIT_DEFAULT_DEPS = "1" |
50 | ALLOW_EMPTY:${PN} = "1" | 50 | ALLOW_EMPTY:${PN} = "1" |
51 | DEPENDS = "virtual/crypt gcc-runtime virtual/${TARGET_PREFIX}gcc" | 51 | DEPENDS = "virtual/crypt gcc-runtime virtual/cross-cc" |
52 | 52 | ||
53 | # used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized] | 53 | # used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized] |
54 | DEBUG_OPTIMIZATION:append = " -Wno-error" | 54 | DEBUG_OPTIMIZATION:append = " -Wno-error" |
@@ -75,9 +75,9 @@ RRECOMMENDS:${PN}:append:powerpc64 = " liblsan libtsan" | |||
75 | RRECOMMENDS:${PN}:append:aarch64 = " liblsan libtsan" | 75 | RRECOMMENDS:${PN}:append:aarch64 = " liblsan libtsan" |
76 | RRECOMMENDS:${PN}:append:riscv64 = " liblsan libtsan" | 76 | RRECOMMENDS:${PN}:append:riscv64 = " liblsan libtsan" |
77 | 77 | ||
78 | do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" | 78 | do_package_write_ipk[depends] += "virtual/${MLPREFIX}compilerlibs:do_packagedata" |
79 | do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" | 79 | do_package_write_deb[depends] += "virtual/${MLPREFIX}compilerlibs:do_packagedata" |
80 | do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" | 80 | do_package_write_rpm[depends] += "virtual/${MLPREFIX}compilerlibs:do_packagedata" |
81 | 81 | ||
82 | # Only x86, powerpc, sparc, s390, arm, aarch64 and loongarch64 are supported | 82 | # Only x86, powerpc, sparc, s390, arm, aarch64 and loongarch64 are supported |
83 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64|loongarch64|riscv64).*-linux' | 83 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64|loongarch64|riscv64).*-linux' |
diff --git a/meta/recipes-devtools/gcc/libgcc-initial.inc b/meta/recipes-devtools/gcc/libgcc-initial.inc index 8251e3c286..ce100d7ddc 100644 --- a/meta/recipes-devtools/gcc/libgcc-initial.inc +++ b/meta/recipes-devtools/gcc/libgcc-initial.inc | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | require libgcc-common.inc | 30 | require libgcc-common.inc |
31 | 31 | ||
32 | DEPENDS = "virtual/${TARGET_PREFIX}gcc" | 32 | DEPENDS = "virtual/cross-cc" |
33 | 33 | ||
34 | LICENSE = "GPL-3.0-with-GCC-exception" | 34 | LICENSE = "GPL-3.0-with-GCC-exception" |
35 | 35 | ||
diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc index 84a2d930df..9554475382 100644 --- a/meta/recipes-devtools/gcc/libgcc.inc +++ b/meta/recipes-devtools/gcc/libgcc.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | require libgcc-common.inc | 1 | require libgcc-common.inc |
2 | 2 | ||
3 | DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ virtual/${MLPREFIX}libc" | 3 | DEPENDS = "virtual/cross-cc virtual/cross-c++ virtual/${MLPREFIX}libc" |
4 | 4 | ||
5 | do_install:append:class-target () { | 5 | do_install:append:class-target () { |
6 | if [ "${TCLIBC}" != "glibc" ]; then | 6 | if [ "${TCLIBC}" != "glibc" ]; then |
diff --git a/meta/recipes-devtools/gcc/libgfortran.inc b/meta/recipes-devtools/gcc/libgfortran.inc index 2a08872c25..4560421ed1 100644 --- a/meta/recipes-devtools/gcc/libgfortran.inc +++ b/meta/recipes-devtools/gcc/libgfortran.inc | |||
@@ -49,7 +49,7 @@ do_install () { | |||
49 | 49 | ||
50 | # avoid virtual/libc | 50 | # avoid virtual/libc |
51 | INHIBIT_DEFAULT_DEPS = "1" | 51 | INHIBIT_DEFAULT_DEPS = "1" |
52 | DEPENDS = "virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}compilerlibs" | 52 | DEPENDS = "virtual/cross-cc virtual/compilerlibs" |
53 | 53 | ||
54 | BBCLASSEXTEND = "nativesdk" | 54 | BBCLASSEXTEND = "nativesdk" |
55 | 55 | ||
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc index 058ffbc9c5..9150c196a8 100644 --- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc | |||
@@ -7,7 +7,7 @@ PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" | |||
7 | BPN = "gdb" | 7 | BPN = "gdb" |
8 | 8 | ||
9 | DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-gmp nativesdk-mpfr \ | 9 | DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-gmp nativesdk-mpfr \ |
10 | virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}binutils virtual/nativesdk-libc" | 10 | virtual/nativesdk-cross-cc virtual/nativesdk-cross-binutils virtual/nativesdk-libc" |
11 | 11 | ||
12 | GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'" | 12 | GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'" |
13 | 13 | ||
diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc index dd485b6799..ff6c063d69 100644 --- a/meta/recipes-devtools/go/go-cross-canadian.inc +++ b/meta/recipes-devtools/go/go-cross-canadian.inc | |||
@@ -1,8 +1,8 @@ | |||
1 | inherit cross-canadian | 1 | inherit cross-canadian |
2 | 2 | ||
3 | DEPENDS = "go-native virtual/${HOST_PREFIX}go virtual/nativesdk-${HOST_PREFIX}go-runtime \ | 3 | DEPENDS = "go-native virtual/${HOST_PREFIX}go virtual/nativesdk-${HOST_PREFIX}go-runtime \ |
4 | virtual/${HOST_PREFIX}gcc virtual/nativesdk-libc \ | 4 | virtual/nativesdk-cross-cc virtual/nativesdk-libc \ |
5 | virtual/nativesdk-${HOST_PREFIX}compilerlibs" | 5 | virtual/nativesdk-compilerlibs" |
6 | PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}" | 6 | PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}" |
7 | 7 | ||
8 | # it uses gcc on build machine during go-cross-canadian bootstrap, but | 8 | # it uses gcc on build machine during go-cross-canadian bootstrap, but |
diff --git a/meta/recipes-devtools/go/go-crosssdk.inc b/meta/recipes-devtools/go/go-crosssdk.inc index 12939005c0..4f19025ba7 100644 --- a/meta/recipes-devtools/go/go-crosssdk.inc +++ b/meta/recipes-devtools/go/go-crosssdk.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | inherit crosssdk | 1 | inherit crosssdk |
2 | 2 | ||
3 | DEPENDS = "go-native virtual/${TARGET_PREFIX}gcc virtual/nativesdk-${TARGET_PREFIX}compilerlibs virtual/${TARGET_PREFIX}binutils" | 3 | DEPENDS = "go-native virtual/nativesdk-cross-cc virtual/nativesdk-compilerlibs virtual/nativesdk-cross-binutils" |
4 | PN = "go-crosssdk-${SDK_SYS}" | 4 | PN = "go-crosssdk-${SDK_SYS}" |
5 | PROVIDES = "virtual/${TARGET_PREFIX}go" | 5 | PROVIDES = "virtual/${TARGET_PREFIX}go" |
6 | 6 | ||
diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc b/meta/recipes-devtools/rust/rust-cross-canadian.inc index c34b839d15..25c0e64ba1 100644 --- a/meta/recipes-devtools/rust/rust-cross-canadian.inc +++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc | |||
@@ -9,7 +9,7 @@ LICENSE = "MIT" | |||
9 | 9 | ||
10 | MODIFYTOS = "0" | 10 | MODIFYTOS = "0" |
11 | 11 | ||
12 | DEPENDS += "virtual/${SDK_PREFIX}gcc virtual/nativesdk-libc virtual/nativesdk-${SDK_PREFIX}compilerlibs" | 12 | DEPENDS += "virtual/nativesdk-cross-cc virtual/nativesdk-libc virtual/nativesdk-compilerlibs" |
13 | 13 | ||
14 | SRC_URI += "file://target-rust-ccld.c" | 14 | SRC_URI += "file://target-rust-ccld.c" |
15 | LIC_FILES_CHKSUM = "file://target-rust-ccld.c;md5=af4e0e29f81a34cffe05aa07c89e93e9;endline=7" | 15 | LIC_FILES_CHKSUM = "file://target-rust-ccld.c;md5=af4e0e29f81a34cffe05aa07c89e93e9;endline=7" |