summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual
diff options
context:
space:
mode:
authorAntonin Godard <antonin.godard@bootlin.com>2025-10-06 15:03:05 +0200
committerSteve Sakoman <steve@sakoman.com>2025-11-03 07:17:02 -0800
commit059f795ebea9d919db50b3fd675d055f92d45c16 (patch)
tree890028d6267292ae49477f0d33683baf764d28d6 /documentation/ref-manual
parent9019056557fe7639578db61d5792a4dfea12ece1 (diff)
downloadpoky-059f795ebea9d919db50b3fd675d055f92d45c16.tar.gz
ref-manual/classes.rst: extend the uninative class documentation
Extend the documentation of the uninative class based on [1]. [1]: https://lore.kernel.org/r/061e6150ce177221f7b6ee8754b03a20347a92c3.camel@linuxfoundation.org Co-developed-by: Richard Purdie <richard.purdie@linuxfoundation.org> (From yocto-docs rev: 0193bfa7966f301e46253e25eaa0482aeb21d9d4) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> (cherry picked from commit 68996f0f3bf882714e8d96a0aa7b2492fe16d0c3) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r--documentation/ref-manual/classes.rst61
1 files changed, 45 insertions, 16 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 2d560bd7ee..e238575a15 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -3363,22 +3363,51 @@ imitates.
3363``uninative`` 3363``uninative``
3364============= 3364=============
3365 3365
3366Attempts to isolate the build system from the host distribution's C 3366The :ref:`ref-classes-uninative` class allows binaries to run on systems with
3367library in order to make re-use of native shared state artifacts across 3367older or newer :wikipedia:`Glibc <Glibc>` versions. This means
3368different host distributions practical. With this class enabled, a 3368:ref:`ref-classes-native` recipe :ref:`overview-manual/concepts:shared state
3369tarball containing a pre-built C library is downloaded at the start of 3369cache` can be shared among different host distributions of different versions,
3370the build. In the Poky reference distribution this is enabled by default 3370i.e. the :ref:`overview-manual/concepts:shared state cache` is "universal".
3371through ``meta/conf/distro/include/yocto-uninative.inc``. Other 3371
3372distributions that do not derive from poky can also 3372To allow this to work, the dynamic loader is changed to our own :manpage:`ld.so
3373"``require conf/distro/include/yocto-uninative.inc``" to use this. 3373<ld.so.8>` when binaries are compiled using the
3374Alternatively if you prefer, you can build the uninative-tarball recipe 3374``--dynamic-linker`` option. This means when the binary is executed, it finds
3375yourself, publish the resulting tarball (e.g. via HTTP) and set 3375our own :manpage:`ld.so <ld.so.8>` and that loader has a modified search path
3376``UNINATIVE_URL`` and ``UNINATIVE_CHECKSUM`` appropriately. For an 3376which finds a newer Glibc version.
3377example, see the ``meta/conf/distro/include/yocto-uninative.inc``. 3377
3378 3378The linking of the binaries is not changed at link time since the
3379The :ref:`ref-classes-uninative` class is also used unconditionally by the extensible 3379headers on the system wouldn't match the newer Glibc and this causes
3380SDK. When building the extensible SDK, ``uninative-tarball`` is built 3380obtuse failures. Changing the loader is effectively the same as if the
3381and the resulting tarball is included within the SDK. 3381system had a Glibc upgrade after the binary was compiled, so it is a
3382mechanism supported by upstream.
3383
3384One caveat to this approach is that the uninative Glibc binary must be
3385equal to or newer in version to the versions on all the systems using
3386the common :ref:`overview-manual/concepts:shared state cache`. This is why
3387:ref:`ref-classes-uninative` is regularly changed on the development and stable
3388branches.
3389
3390Another potential issue is static linking: static libraries created on
3391a system with a new Glibc version may have symbols not present in older
3392versions, which would then fail during linking on older systems. This
3393is one reason we don't use static linking for our :ref:`ref-classes-native`
3394binaries.
3395
3396With this class enabled, a tarball containing a pre-built C library is
3397downloaded at the start of the build. In the Poky reference distribution this is
3398enabled by default through :oe_git:`meta/conf/distro/include/yocto-uninative.inc
3399</openembedded-core/tree/meta/conf/distro/include/yocto-uninative.inc>`. Other distributions that do
3400not derive from Poky can also "``require conf/distro/include/yocto-uninative.inc``"
3401to use this. Alternatively if you prefer, you can build the uninative-tarball
3402recipe yourself, publish the resulting tarball (e.g. via HTTP) and set
3403:term:`UNINATIVE_URL` and :term:`UNINATIVE_CHECKSUM` appropriately. For an
3404example, see :oe_git:`meta/conf/distro/include/yocto-uninative.inc
3405</openembedded-core/tree/meta/conf/distro/include/yocto-uninative.inc>`.
3406
3407The :ref:`ref-classes-uninative` class is also used unconditionally by the
3408:doc:`extensible SDK </sdk-manual/extensible>`. When building the extensible
3409SDK, ``uninative-tarball`` is built and the resulting tarball is included within
3410the SDK.
3382 3411
3383.. _ref-classes-update-alternatives: 3412.. _ref-classes-update-alternatives:
3384 3413