ulib: Restrict shared library build to sandbox only

Shared libraries are only meaningful for sandbox builds that run on the
host system. For bare-metal targets like x86, only the static library
(libu-boot.a) makes sense.

Make CONFIG_ULIB_SHARED_LIB depend on SANDBOX to avoid link errors about
missing C-runtime files.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-11 14:47:58 -07:00
parent da77a8a26f
commit 7b5f0041aa

View File

@@ -114,7 +114,9 @@ config ULIB_SHARED_LIB
Enable this to build the shared library version (libu-boot.so) in
addition to the static library (libu-boot.a). Disable this if you
only need the static library, which can speed up builds and avoid
linking issues with some configurations.
linking issues with some configurations. This option is only
available for SANDBOX builds since shared libraries are not
meaningful for bare-metal targets.
config ULIB_JUMP_TO_MAIN
bool "Set GD_FLG_ULIB flag in early boot"