The native
class provides common
functionality for recipes that wish to build tools to run on the build
host (i.e. tools that use the compiler or other tools from the
build host).
You can create a recipe that builds tools that run natively on the host a couple different ways:
Create a myrecipe-native.bb
that inherits the native
class.
Create or modify a target recipe that has adds the following:
BBCLASSEXTEND
= "native"
Inside the recipe, use _class-native
and
_class-target
overrides to specify any
functionality specific to the respective native or target
case.
Although applied differently, the native
class is
used with both methods.
The advantage of the second method is that you do not need to have two
separate recipes (assuming you need both) for native and target.
All common parts of the recipe are automatically shared.