diff mbox series

[v3,4/8] ref-manual/variables.rst: document the LTO variable

Message ID 20260323-release-notes-6-0-v3-4-844ec702f95b@bootlin.com
State Under Review
Headers show
Series Update the documentation for 6.0 (Wrynose) | expand

Commit Message

Antonin Godard March 23, 2026, 8:49 a.m. UTC
Added by 228b5a91516c ("lto: Add global LTO distro policy file") in
OE-Core.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/ref-manual/variables.rst | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Quentin Schulz March 23, 2026, 10:23 a.m. UTC | #1
Hi Antonin,

On 3/23/26 9:49 AM, Antonin Godard via lists.yoctoproject.org wrote:
> Added by 228b5a91516c ("lto: Add global LTO distro policy file") in
> OE-Core.
> 
> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
> ---
>   documentation/ref-manual/variables.rst | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
> index 45542d715..6c779e42d 100644
> --- a/documentation/ref-manual/variables.rst
> +++ b/documentation/ref-manual/variables.rst
> @@ -5890,6 +5890,13 @@ system and gives an overview of their function and contents.
>         For the directory containing logs specific to each task, see the
>         :term:`T` variable.
>   
> +   :term:`LTO`
> +      The :term:`LTO` variable define the flags specific to the ``lto``

s/define/defines/

> +      :term:`distro feature <DISTRO_FEATURES>`. The value of this variable is
> +      appended to the :term:`TARGET_LDFLAGS` variable, adding `Link-Time
> +      Optimisation <https://gcc.gnu.org/wiki/LinkTimeOptimization>`__ flags to

LTO isn't GCC-specific so I find it a bit odd to link to the GCC Wiki 
(especially to a page that hasn't been updated in almost 17 years).

Gentoo has some documentation here: https://wiki.gentoo.org/wiki/LTO. It 
describes benefits, downsides and how to use it for llvm and gcc.

Wikipedia has *some* info on WPO/LTO in 
https://en.wikipedia.org/wiki/Interprocedural_optimization.

Cheers,
Quentin
diff mbox series

Patch

diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 45542d715..6c779e42d 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -5890,6 +5890,13 @@  system and gives an overview of their function and contents.
       For the directory containing logs specific to each task, see the
       :term:`T` variable.
 
+   :term:`LTO`
+      The :term:`LTO` variable define the flags specific to the ``lto``
+      :term:`distro feature <DISTRO_FEATURES>`. The value of this variable is
+      appended to the :term:`TARGET_LDFLAGS` variable, adding `Link-Time
+      Optimisation <https://gcc.gnu.org/wiki/LinkTimeOptimization>`__ flags to
+      the linker in-use.
+
    :term:`MACHINE`
       Specifies the target device for which the image is built. You define
       :term:`MACHINE` in the ``local.conf`` file found in the