@@ -267,10 +267,36 @@ def buildcfg_neededvars(d):
bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
addhandler base_eventhandler
-base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.MultiConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.event.RecipeParsed"
+base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.MultiConfigParsed bb.event.BuildStarted bb.event.RecipeTaskPreProcess bb.event.RecipeParsed"
python base_eventhandler() {
import bb.runqueue
+ if isinstance(e, bb.event.RecipeTaskPreProcess):
+ # remapping virtual/xxx
+ pn = d.getVar("PN")
+ virtprovs = (d.getVar("RECIPE_VIRTUAL_PROVIDERS") or "").split()
+ depends = (d.getVar("DEPENDS") or "").split()
+ newdeps = []
+ for dep in depends:
+ if dep in virtprovs:
+ newdep = d.getVar("PREFERRED_PROVIDER_" + dep)
+ if not newdep:
+ bb.fatal("PREFERRED_PROVIDER_%s not set" % dep)
+ else:
+ newdep = dep
+ newdeps.append(newdep)
+ d.setVar("DEPENDS", " ".join(newdeps))
+ tasks = d.getVar("__BBTASKS", False)
+ for task in tasks:
+ task_deps = (d.getVarFlag(task, "depends") or "").split()
+ remapped_deps = []
+ for task_dep in task_deps:
+ r, t = task_dep.split(":")
+ if r in virtprovs:
+ r = d.getVar("PREFERRED_PROVIDER_" + r)
+ remapped_deps.append("%s:%s" % (r, t))
+ d.setVarFlag(task, "depends", " ".join(remapped_deps))
+
if isinstance(e, bb.event.ConfigParsed):
if not d.getVar("NATIVELSBSTRING", False):
d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
@@ -127,7 +127,7 @@ do_populate_sysroot[vardepsexclude] += "BB_MULTI_PROVIDER_ALLOWED"
POPULATESYSROOTDEPS = ""
POPULATESYSROOTDEPS:class-target = "virtual/cross-binutils:do_populate_sysroot"
-POPULATESYSROOTDEPS:class-nativesdk = "virtual/sdk-binutils:do_populate_sysroot"
+POPULATESYSROOTDEPS:class-nativesdk = "virtual/nativesdk-cross-binutils:do_populate_sysroot"
do_populate_sysroot[depends] += "${POPULATESYSROOTDEPS}"
SSTATETASKS += "do_populate_sysroot"
@@ -155,6 +155,12 @@ def preferred_ml_updates(d):
extramp.append(translate_provide(pref, p))
d.setVar("BB_MULTI_PROVIDER_ALLOWED", " ".join(mp + extramp))
+ virtprovs = d.getVar("RECIPE_VIRTUAL_PROVIDERS").split()
+ for p in virtprovs.copy():
+ for pref in prefixes:
+ virtprovs.append(translate_provide(pref, p))
+ d.setVar("RECIPE_VIRTUAL_PROVIDERS", " ".join(virtprovs))
+
abisafe = (d.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split()
extras = []
for p in prefixes:
@@ -1,6 +1,7 @@
#
# Default virtual providers
#
+RECIPE_VIRTUAL_PROVIDERS = "virtual/cross-cc virtual/cross-c++ virtual/cross-binutils virtual/compilerlibs virtual/nativesdk-cross-cc virtual/nativesdk-cross-c++ virtual/nativesdk-cross-binutils virtual/nativesdk-compilerlibs"
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/egl ?= "mesa"
@@ -5,17 +5,17 @@
PREFERRED_PROVIDER_virtual/cross-binutils = "${MLPREFIX}binutils-cross-${TARGET_ARCH}"
PREFERRED_PROVIDER_virtual/cross-cc = "${MLPREFIX}gcc-cross-${TARGET_ARCH}"
PREFERRED_PROVIDER_virtual/cross-c++ = "${MLPREFIX}gcc-cross-${TARGET_ARCH}"
-PREFERRED_PROVIDER_virtual/compilerlibs = "gcc-runtime"
+PREFERRED_PROVIDER_virtual/compilerlibs = "${MLPREFIX}gcc-runtime"
PREFERRED_PROVIDER_gdb = "gdb"
PREFERRED_PROVIDER_virtual/cross-binutils:class-nativesdk ?= "binutils-crosssdk-${SDK_SYS}"
PREFERRED_PROVIDER_virtual/cross-cc:class-nativesdk = "gcc-crosssdk-${SDK_SYS}"
PREFERRED_PROVIDER_virtual/cross-c++:class-nativesdk = "gcc-crosssdk-${SDK_SYS}"
-PREFERRED_PROVIDER_virtual/cross-sdk-binutils ?= "binutils-crosssdk-${SDK_SYS}"
-PREFERRED_PROVIDER_virtual/cross-sdk-cc = "gcc-crosssdk-${SDK_SYS}"
-PREFERRED_PROVIDER_virtual/cross-sdk-c++ = "gcc-crosssdk-${SDK_SYS}"
-PREFERRED_PROVIDER_virtual/sdk-compilerlibs = "nativesdk-gcc-runtime"
+PREFERRED_PROVIDER_virtual/nativesdk-cross-binutils ?= "binutils-crosssdk-${SDK_SYS}"
+PREFERRED_PROVIDER_virtual/nativesdk-cross-cc = "gcc-crosssdk-${SDK_SYS}"
+PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}"
+PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime"
# Default libc config
PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
@@ -4,7 +4,7 @@ SUMMARY = "GNU binary utilities (cross-canadian for ${TARGET_ARCH} target)"
PN = "binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}"
BPN = "binutils"
-DEPENDS = "flex-native bison-native virtual/cross-sdk-cc virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext nativesdk-flex"
+DEPENDS = "flex-native bison-native virtual/nativesdk-cross-cc virtual/nativesdk-libc nativesdk-zlib nativesdk-gettext nativesdk-flex"
EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
--enable-poison-system-directories \
"
@@ -1,5 +1,4 @@
inherit cross
-PROVIDES = "virtual/cross-binutils"
PN = "binutils-cross-${TARGET_ARCH}"
BPN = "binutils"
@@ -1,7 +1,5 @@
require binutils-cross_${PV}.bb
-PROVIDES = "virtual/cross-sdk-binutils"
-
inherit crosssdk
PN = "binutils-crosssdk-${SDK_SYS}"
@@ -3,7 +3,7 @@ inherit cross-canadian
SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
-DEPENDS = "virtual/cross-sdk-cc virtual/cross-cc virtual/cross-sdk-binutils virtual/nativesdk-libc nativesdk-gettext flex-native virtual/libc"
+DEPENDS = "virtual/nativesdk-cross-cc virtual/cross-cc virtual/nativesdk-cross-binutils virtual/nativesdk-libc nativesdk-gettext flex-native virtual/libc"
GCCMULTILIB = "--enable-multilib"
@@ -3,7 +3,6 @@ inherit cross
INHIBIT_DEFAULT_DEPS = "1"
EXTRADEPENDS = ""
DEPENDS = "virtual/cross-binutils ${EXTRADEPENDS} ${NATIVEDEPS}"
-PROVIDES = "virtual/cross-cc virtual/c++"
python () {
if d.getVar("TARGET_OS").startswith("linux"):
d.setVar("EXTRADEPENDS", "linux-libc-headers")
@@ -8,7 +8,7 @@ SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/"
GCCMULTILIB = "--disable-multilib"
-DEPENDS = "virtual/cross-sdk-binutils gettext-native ${NATIVEDEPS}"
-PROVIDES = "virtual/cross-sdk-cc virtual/cross-sdk-c++"
+DEPENDS = "virtual/nativesdk-cross-binutils gettext-native ${NATIVEDEPS}"
+PROVIDES = "virtual/nativesdk-cross-cc virtual/nativesdk-cross-c++"
gcc_multilib_setup[vardepsexclude] = "MULTILIB_VARIANTS"
@@ -157,7 +157,7 @@ do_install:append:class-target () {
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = "virtual/cross-cc virtual/cross-c++ ${MLPREFIX}libgcc virtual/${MLPREFIX}libc"
-DEPENDS:class-nativesdk = "virtual/cross-sdk-cc virtual/cross-sdk-c++ ${MLPREFIX}libgcc virtual/${MLPREFIX}libc"
+DEPENDS:class-nativesdk = "virtual/nativesdk-cross-cc virtual/nativesdk-cross-c++ ${MLPREFIX}libgcc virtual/${MLPREFIX}libc"
PROVIDES = "virtual/${MLPREFIX}compilerlibs"
BBCLASSEXTEND = "nativesdk"
@@ -7,7 +7,7 @@ PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
BPN = "gdb"
DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-gmp nativesdk-mpfr \
- virtual/cross-sdk-cc virtual/cross-sdk-binutils virtual/nativesdk-libc"
+ virtual/nativesdk-cross-cc virtual/nativesdk-cross-binutils virtual/nativesdk-libc"
GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
@@ -1,7 +1,7 @@
inherit cross-canadian
DEPENDS = "go-native virtual/${HOST_PREFIX}go virtual/nativesdk-${HOST_PREFIX}go-runtime \
- virtual/cross-sdk-cc virtual/nativesdk-libc \
+ virtual/nativesdk-cross-cc virtual/nativesdk-libc \
virtual/nativesdk-compilerlibs"
PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}"
@@ -1,6 +1,6 @@
inherit crosssdk
-DEPENDS = "go-native virtual/cross-sdk-cc virtual/nativesdk-compilerlibs virtual/cross-sdk-binutils"
+DEPENDS = "go-native virtual/nativesdk-cross-cc virtual/nativesdk-compilerlibs virtual/nativesdk-cross-binutils"
PN = "go-crosssdk-${SDK_SYS}"
PROVIDES = "virtual/${TARGET_PREFIX}go"
@@ -9,7 +9,7 @@ LICENSE = "MIT"
MODIFYTOS = "0"
-DEPENDS += "virtual/cross-sdk-cc virtual/nativesdk-libc virtual/nativesdk-compilerlibs"
+DEPENDS += "virtual/nativesdk-cross-cc virtual/nativesdk-libc virtual/nativesdk-compilerlibs"
SRC_URI += "file://target-rust-ccld.c"
LIC_FILES_CHKSUM = "file://target-rust-ccld.c;md5=af4e0e29f81a34cffe05aa07c89e93e9;endline=7"