summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/native.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* The poky repository master branch is no longer being updated.Richard Purdie2025-11-071-229/+0
| | | | | | | | | | | | | | | | | | | | | You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Switch classextend to use new filter APIRichard Purdie2025-08-121-29/+10
| | | | | | | | | | | | | | | | | | Currently, class extensions are implmented using shadow variables and access indirection which is horribly ineffient and ugly. Switch to using the new bitbake filter API, which allows a translation of the variable before the expanded value is returned. This allows us to drop the shadow variable accesses. It also avoids the need to iterate PACKAGES and make many variable changes since a filter against RDEPENDS applies to RDEPENDS:${PN} and all of it's other overridden values. Since data expansion happens at access, it also avoids many of the race conditions this code has tranditionally been plagued with. (From OE-Core rev: 24a9858a8927e91d499ee342ed93a0dbb44d83bc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native: Drop export statements that aren't neededRichard Purdie2025-03-181-14/+14
| | | | | | | | These are already exported by bitbake.conf, no need to export them again. (From OE-Core rev: 92e52f5afac4877366c1ee2e6c6f0d1f5df84410) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native: follow BUILD_* definitions for OBJCOPY, OBJDUMP and READELFAntonin Godard2025-03-181-0/+3
| | | | | | | | | | | | | | Set the host OBJCOPY, OBJDUMP, and READELF variables to be derived from their corresponding BUILD_* definitions. This makes the native class match the build-gcc.inc file 1 to 1, as these were the only missing. Currently these variables get their definitions from gcc.inc, which uses HOST_PREFIX, and that works because the native class sets HOST_PREFIX to BUILD_PREFIX, but this doesn't seem correct. (From OE-Core rev: 87a6ffe21b706e6aeeeb77891565cbd7730ca163) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native: Improve ${PN}-XXX package name handlingRichard Purdie2025-01-101-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a recipe has something like: RPROVIDES:${PN}-xxx = "yyy" then the current code will turn this into: RPROVIDES:${BPN}-native-xxx = "yyy-native" which can lead to errors. Add in some handling for this special case in the class extension code. The corresponding entry in PACKAGES is correctly remapped, the variables aren't remapped to match though. Note that merging this does trigger new dependencies to be exposed, some of which can't be met or are incorrect. These need to be fixed on a case by case basis. There was also a problem in the existing code when handling anonymous python in PACKAGES since it would pass bizarre package names like "d)}" to the remapping code. This patch changes it to ignore anonymous python since in the native case, this likely isn't wanted anyway. This also then avoids ${PN}-ptest in the native case which was a common dependency problem. (From OE-Core rev: e2fd81e221c25fc21d532e020ddd8aaac0c22ede) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/nativesdk: Stop overriding unprefixed *FLAGS variablesRichard Purdie2024-07-011-5/+0
| | | | | | | | | | | | | | | | | | | | We're currently encouraging an "arms race" with the FLAGS variables since a recipe might want to set a specific flag for all variants but to do so, += won't work due to the assignment in the native/nativesdk class files. This means recipes are using append. Since the default variables are constructed out of TARGET_XXX variables and we redefine these, there is no need to re-define the un-prefixed variables. If we drop that, the += appends and similar work and recipes don't have to resort to append. Change the classes and cleanup a number of recipes to adapt to the change. This change will result in some flags appearing to some native/nativesdk variants but that is probably what was originally expected anyway. (From OE-Core rev: a157b2f9d93428ca21265cc860a3b58b3698b3aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native.bbclass: base_libdir unique from libdirWilliam Hauser2024-01-261-1/+1
| | | | | | | | | | | | Use STAGING_BASE_LIBDIR_NATIVE for the value of base_libdir instead of STAGING_LIBDIR_NATIVE. This will avoid conflicts between the two directories. (From OE-Core rev: 2d7e3d49378257bc02513275b988c8b194e9fd5a) Signed-off-by: William Hauser <william.hauser@meraki.net> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native: Implement BBCLASSEXTEND PACKAGES_DYNAMIC handlingRichard Purdie2023-01-261-2/+5
| | | | | | | | | | | Recipes that use native BBCLASSEXTEND and set PACKAGES_DYNAMIC will currently see PREFERRED_PROVIDER warnings. Some recipes work around this but lets fix the core code to handle remapping PACKAGES_DYNAMIC correctly so the workarounds aren't necessary any more. (From OE-Core rev: e74b416231610ce3962e5b7bc21bd382579802ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native: Drop special variable handlingRichard Purdie2023-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Back when it was merged in https://git.yoctoproject.org/poky/commit/?id=c4257ed8b1040a5a0e9a95846d81961741239116 it appeared special handling in setVar was necessary. Likely due to other fixes and improvements it no longer appears to be. The results of "bitbake world -g" before and after this change are identical for oe-core and meta-openembedded. Therefore drop the "parsing=True" special parameter to setVar() meaning overrides can now be cleared. This means that something like: DEPENDS:append = " bash" now functions as expected, adding bash to the target recipe and bash-native to the native BBCLASSEXTENDED version. Without this change, it would add bash to the native version as well as bash-native which is clearly incorrect. [YOCTO #15010] (From OE-Core rev: 99a5105f7b5303cd36077b5910c662a865c1782c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update classes to match new bitbake class scope functionalityRichard Purdie2022-08-121-0/+236
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>