Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git i/meta/classes/base.bbclass w/meta/classes/base.bbclass
index d68ffbe..b3191a5 100644
--- i/meta/classes/base.bbclass
+++ w/meta/classes/base.bbclass
@@ -60,25 +60,17 @@ oe_runmake() {
}
-def base_dep_prepend(d):
- #
- # Ideally this will check a flag so we will operate properly in
- # the case where host == build == target, for now we don't work in
- # that case though.
- #
-
- deps = ""
- # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
- # we need that built is the responsibility of the patch function / class, not
- # the application.
- if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
- if (d.getVar('HOST_SYS', True) != d.getVar('BUILD_SYS', True)):
- deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
- return deps
+TOOLCHAIN_BASEDEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
-BASEDEPENDS = "${@base_dep_prepend(d)}"
+def toolchain_basedepends(d):
+ if d.getVar('HOST_SYS', True) != d.getVar('BUILD_SYS', True):
+ return d.getVar("TOOLCHAIN_BASEDEPENDS", True)
+ else:
+ return ""
-DEPENDS_prepend="${BASEDEPENDS} "
+INHIBIT_DEFAULT_DEPS ?= ""
+BASEDEPENDS = "${@toolchain_basedepends(d)}"
+DEPENDS_prepend = "${@'${BASEDEPENDS} ' if not bb.utils.to_boolean('${INHIBIT_DEFAULT_DEPS}') else ''}"
FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
# THISDIR only works properly with imediate expansion as it has to run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.