From db1f1adace58763c35774e3fdfeaac5c3ca646fd Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Tue, 11 Apr 2017 17:35:40 +0300 Subject: native/nativesdk: Use fixed DISTRO_FEATURES There seems to be little advantage to letting distro features affect native builds. There is a significant disadvantage: a change to DISTRO_FEATURES will trigger a lot of unnecessary native tasks. In a test like this: $ bitbake core-image-minimal # append " systemd" to DISTRO_FEATURES $ bitbake core-image-minimal The latter build takes 44 minutes (28%) of cpu-time less with this patch (skipping 135 native tasks). Sadly wall clock time was not affected as glibc remains the bottleneck. Set native distro features to DISTRO_FEATURES_NATIVE appended with an intersection of DISTRO_FEATURES and DISTRO_FEATURES_FILTER_NATIVE. Current default values (baitbake.conf) are * DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation" (as gtk-doc-native has much less dependencies when built without it) * DISTRO_FEATURES_NATIVE ?= "x11" (to enable native UIs even if target does not containe them) Do the variable setting in native_virtclass_handler() because otherwise it could still be overridden by appends and the feature backfilling. Shuffle the early returns so DISTRO_FEATURES gets set as long as the packagename ends with "-native". Add similar variables for nativesdk. To make nativesdk work we need to enable the locale options so nativesdk-glibc-locales can build and to avoid the init manager check in the nativesdk case so add those fixes. (From OE-Core rev: 731744d5538e315702be828e6f2bd556309dee07) Signed-off-by: Jussi Kukkonen Signed-off-by: Richard Purdie --- meta/classes/packagegroup.bbclass | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta/classes/packagegroup.bbclass') diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass index 4af4a014b0..eea2e5b9fc 100644 --- a/meta/classes/packagegroup.bbclass +++ b/meta/classes/packagegroup.bbclass @@ -49,6 +49,8 @@ deltask do_install deltask do_populate_sysroot python () { + if bb.data.inherits_class('nativesdk', d): + return initman = d.getVar("VIRTUAL-RUNTIME_init_manager") if initman and initman in ['sysvinit', 'systemd'] and not bb.utils.contains('DISTRO_FEATURES', initman, True, False, d): bb.fatal("Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (%s) matches the entries enabled in DISTRO_FEATURES" % initman) -- cgit v1.2.3-54-g00ecf