ref-manual: Add RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE variables
PATCH 2/3 ref-manual: Add RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE variables
--- documentation/ref-manual/variables.rst | 40 +++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-)
documentation/ref-manual/variables.rst +39 -1
@@ -6945,6 +6945,40 @@ system and gives an overview of their function and contents. in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`" section. + :term:`RECIPE_SYSROOT` + This variable points to the directory that holds all files populated from + recipes specified in :term:`DEPENDS`. As the name indicates, + think of this variable as a custom root ``/`` for the recipe that will be + used by the compiler in order to find headers and other needs to complete + its job. + + The value of this variable will be affected to :term:`TOOLCHAIN_OPTIONS` + as:: + + TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}" + + This variable is related to :term:`STAGING_DIR_HOST` or :term:`STAGING_DIR_TARGET` + according to the type of the recipe and the build target. + + To understand more this variable, consider the following examples: + + - For ``#include <header.h>``, ``header.h`` should be in ``"${RECIPE_SYSROOT}/usr/include"`` + - For ``-lexample``, ``libexample.so`` should be in ``"${RECIPE_SYSROOT}/lib"`` + or other library sysroot directories. + + The default value is ``"${WORKDIR}/recipe-sysroot"``. + Do not change the default value. + + :term:`RECIPE_SYSROOT_NATIVE` + This is the same as :term:`RECIPE_SYSROOT` but the populated files are from + ``-native`` recipes. This makes a recipe built for the target machine + can use ``native`` tools. + + This variable is related to :term:`STAGING_DIR_NATIVE`. + + The default value is ``"${WORKDIR}/recipe-sysroot-native"``. + Do not change the default value. + :term:`REPODIR` See :term:`bitbake:REPODIR` in the BitBake manual.
@@ -8216,7 +8250,8 @@ system and gives an overview of their function and contents. the component is built to run (the system that hosts the component). For most recipes, this sysroot is the one in which that recipe's :ref:`ref-tasks-populate_sysroot` task copies - files. Exceptions include ``-native`` recipes, where the + files, check :term:`RECIPE_SYSROOT`. + Exceptions include ``-native`` recipes, where the :ref:`ref-tasks-populate_sysroot` task instead uses :term:`STAGING_DIR_NATIVE`. Depending on the type of recipe and the build target, :term:`STAGING_DIR_HOST` can
@@ -8253,6 +8288,9 @@ system and gives an overview of their function and contents. Specifies the path to the sysroot directory used when building components that run on the build host itself. + The default value is ``"${RECIPE_SYSROOT_NATIVE}"``, + check :term:`RECIPE_SYSROOT_NATIVE` + :term:`STAGING_DIR_TARGET` Specifies the path to the sysroot used for the system for which the component generates code. For components that do not generate code,
Signature · 1 line
2.25.1
Hi Talel
Quoted 10 lines · BELHADJ SALEM Talel
Signed-off-by Talel BELHAJSALEM <[email protected]>--- documentation/ref-manual/variables.rst | 40 +++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-)documentation/ref-manual/variables.rst +0
-0
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6952
Quoted 8 lines
documentation/ref-manual/variables.rst +5
-0@@ -6945,6 +6945,40 @@ system and gives an overview of their function and contents. in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`" section. + :term:`RECIPE_SYSROOT` + This variable points to the directory that holds all files populated from + recipes specified in :term:`DEPENDS`. As the name indicates, + think of this variable as a custom root ``/`` for the recipe that will be + used by the compiler in order to find headers and other needs to complete
s/other needs/other files needed/
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6955
Quoted 3 lines
documentation/ref-manual/variables.rst +3
-0+ its job. + + The value of this variable will be affected to :term:`TOOLCHAIN_OPTIONS`
s/affected/set/
Here too, you need the 3rd patch to compile the second one. It seems you sent the patches in reverse order ;-)
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6957
Quoted 2 lines
documentation/ref-manual/variables.rst +2
-0+ as:: +
Caution: you have a line with unnecessary spaces it. Git warns about them, and my editor flags them too.
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6963
Quoted 6 lines
documentation/ref-manual/variables.rst +6
-0+ TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}" + + This variable is related to :term:`STAGING_DIR_HOST` or :term:`STAGING_DIR_TARGET` + according to the type of the recipe and the build target. + + To understand more this variable, consider the following examples:
To understand this variable better
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6967
Quoted 4 lines
documentation/ref-manual/variables.rst +4
-0+ + - For ``#include <header.h>``, ``header.h`` should be in ``"${RECIPE_SYSROOT}/usr/include"`` + - For ``-lexample``, ``libexample.so`` should be in ``"${RECIPE_SYSROOT}/lib"`` + or other library sysroot directories.
In our manuals, we usually add two spaces after "-" to introduce enumerations (see other files or standards.md)
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6970
Quoted 3 lines
documentation/ref-manual/variables.rst +3
-0+ + The default value is ``"${WORKDIR}/recipe-sysroot"``. + Do not change the default value.
Do not modify it.
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6973
Quoted 3 lines
documentation/ref-manual/variables.rst +3
-0+ + :term:`RECIPE_SYSROOT_NATIVE` + This is the same as :term:`RECIPE_SYSROOT` but the populated files are from
s/This is the same as/This is similar to/ (sounding better)
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6975
Quoted 2 lines
documentation/ref-manual/variables.rst +2
-0+ ``-native`` recipes. This makes a recipe built for the target machine + can use ``native`` tools.
This allows a recipe built for the target machine to use ``native`` tools?
documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6980
Quoted 5 lines
documentation/ref-manual/variables.rst +5
-0+ + This variable is related to :term:`STAGING_DIR_NATIVE`. + + The default value is ``"${WORKDIR}/recipe-sysroot-native"``. + Do not change the default value.
Do not modify it.
Thanks,
Michael.
Signature · 3 lines
Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com