Skip to contentSkip to conversation

ref-manual: Add TOOLCHAIN_OPTIONS variable

PATCH In review Talel BELHAJSALEM 2 participants 4 messages Oct 16, 2023 – Oct 19, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 ref-manual: Add TOOLCHAIN_OPTIONS variable

---
 documentation/ref-manual/variables.rst | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
documentation/ref-manual/variables.rst +12 -6
index 246584fc5..6cb4efff5 100644
@@ -6952,13 +6952,9 @@ system and gives an overview of their function and contents.
       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.
+      according to the type of the recipe and the build target and also related to
+      :term:`TOOLCHAIN_OPTIONS`.
 
       To understand more this variable, consider the following examples:
 
@@ -9141,6 +9137,16 @@ system and gives an overview of their function and contents.
       portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
       applying to SDKs.
 
+   :term:`TOOLCHAIN_OPTIONS`
+      This variable holds extra options passed to the compiler and the linker
+      for non ``-native`` recipes as they have to point to their custom
+      ``sysroot`` folder pointed to by :term:`RECIPE_SYSROOT`::
+
+         TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}"
+
+      As ``-native`` recipes are built for the ``HOST`` itself this variable
+      is not used, thus it is empty.
+
    :term:`TOOLCHAIN_OUTPUTNAME`
       This variable defines the name used for the toolchain output. The
       :ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
Signature · 1 line
2.25.1
#1 lore raw

Hello Talel,

Quoted 12 lines · BELHADJ SALEM Talel
---
  documentation/ref-manual/variables.rst | 18 ++++++++++++------
  1 file changed, 12 insertions(+), 6 deletions(-)
documentation/ref-manual/variables.rst +0 -0
index 246584fc5..6cb4efff5 100644
@@ -6952,13 +6952,9 @@ system and gives an overview of their function and contents.
        used by the compiler in order to find headers and other needs to complete
        its job.

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6957

Quoted 10 lines
documentation/ref-manual/variables.rst +2 -6
 
-      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.
+      according to the type of the recipe and the build target and also related to
+      :term:`TOOLCHAIN_OPTIONS`.

This part of the commit is weird, as you're making changes to your previous commit. This change should go in your second patch, to minimize the effort for people reviewing your changes (or studying the commit history when the patch is merged it).

Quoted 6 lines
documentation/ref-manual/variables.rst +0 -0
        To understand more this variable, consider the following examples:
 
@@ -9141,6 +9137,16 @@ system and gives an overview of their function and contents.
        portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
        applying to SDKs.

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 9148

Quoted 10 lines
documentation/ref-manual/variables.rst +9 -0
 
+   :term:`TOOLCHAIN_OPTIONS`
+      This variable holds extra options passed to the compiler and the linker
+      for non ``-native`` recipes as they have to point to their custom
+      ``sysroot`` folder pointed to by :term:`RECIPE_SYSROOT`::
+
+         TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}"
+
+      As ``-native`` recipes are built for the ``HOST`` itself this variable
+      is not used, thus it is empty.

Don't you just mean that native recipes don't need this variable to be set, as they are built for the host machine with the native compiler?

Thanks
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

Hello Michael,

The reason for the commits are in reverse is that when I added support for a variable I discovered that another one is missing
and I need to create another commit, I am new to handling patches with Git, next I think I need to analyze exactly what I need to do and do it in the right way.

I will fix all comments.

Thanks for the review.

Kind regards
Talel

Quoted 72 lines · Michael Opdenacker

Hello Talel,

Review

Quoted 6 lines · BELHADJ SALEM Talel
---
  documentation/ref-manual/variables.rst | 18 ++++++++++++------
  1 file changed, 12 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

b/documentation/ref-manual/variables.rst

documentation/ref-manual/variables.rst system and gives an overview of their function

Quoted 4 lines

index 246584fc5..6cb4efff5 100644

documentation/ref-manual/variables.rst +0 -0
@@ -6952,13 +6952,9 @@ system and gives an overview of their function

and contents.

documentation/ref-manual/variables.rst system and gives an overview of their function · line 6952

Quoted 1 line
documentation/ref-manual/variables.rst +0 -0
        used by the compiler in order to find headers and other needs to

complete

documentation/ref-manual/variables.rst system and gives an overview of their function and contents.

Quoted 3 lines
documentation/ref-manual/variables.rst +0 -1
        its job.
 
-      The value of this variable will be affected to

:term:TOOLCHAIN_OPTIONS

documentation/ref-manual/variables.rst system and gives an overview of their function and contents.

Quoted 5 lines
documentation/ref-manual/variables.rst +0 -4
-      as::
-
-         TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}"
-
        This variable is related to :term:`STAGING_DIR_HOST` or

:term:STAGING_DIR_TARGET

documentation/ref-manual/variables.rst system and gives an overview of their function · line 6956

Quoted 2 lines
documentation/ref-manual/variables.rst +1 -1
-      according to the type of the recipe and the build target.
+      according to the type of the recipe and the build target and also

related to

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 6957

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      :term:`TOOLCHAIN_OPTIONS`.

This part of the commit is weird, as you're making changes to your previous commit. This change should go in your second patch, to minimize the effort for people reviewing your changes (or studying the commit history when the patch is merged it).

documentation/ref-manual/variables.rst system and gives an overview of their function · line 6958

Quoted 2 lines
documentation/ref-manual/variables.rst +0 -0
        To understand more this variable, consider the following

examples:

documentation/ref-manual/variables.rst system and gives an overview of their function

Quoted 2 lines
documentation/ref-manual/variables.rst +0 -0
@@ -9141,6 +9137,16 @@ system and gives an overview of their function

and contents.

documentation/ref-manual/variables.rst system and gives an overview of their function · line 9137

Quoted 1 line
documentation/ref-manual/variables.rst +0 -0
        portion of an eSDK. This is similar to

:term:TOOLCHAIN_HOST_TASK

documentation/ref-manual/variables.rst system and gives an overview of their function and contents.

Quoted 4 lines
documentation/ref-manual/variables.rst +2 -0
        applying to SDKs.
 
+   :term:`TOOLCHAIN_OPTIONS`
+      This variable holds extra options passed to the compiler and the

linker

documentation/ref-manual/variables.rst system and gives an overview of their function and contents.

Quoted 6 lines
documentation/ref-manual/variables.rst +6 -0
+      for non ``-native`` recipes as they have to point to their custom
+      ``sysroot`` folder pointed to by :term:`RECIPE_SYSROOT`::
+
+         TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}"
+
+      As ``-native`` recipes are built for the ``HOST`` itself this

variable

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 9148

Quoted 1 line
documentation/ref-manual/variables.rst +1 -0
+      is not used, thus it is empty.

Don't you just mean that native recipes don't need this variable to be set, as they are built for the host machine with the native compiler?

Thanks
Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#3 lore raw

Hi Talel

Quoted 8 lines · BELHADJ SALEM Talel

Hello Michael,

The reason for the commits are in reverse is that when I added support for a variable I discovered that another one is missing
and I need to create another commit, I am new to handling patches with Git, next I think I need to analyze exactly what I need to do and do it in the right way.

I will fix all comments.

Thanks for the review.

Very happy to help!
Everyone has to go through this and learning how to organize patches is a very nice though not trivial learning experience :)

Don't hesitate to ask for tips. A great one is using "git rebase -i" to reorganize your commits vs the branch you started from. Cheers
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com