diff options
author | Jerome Forissier <jerome.forissier@linaro.org> | 2018-05-29 18:03:11 +0200 |
---|---|---|
committer | Jérôme Forissier <jerome.forissier@linaro.org> | 2019-03-05 12:54:55 +0100 |
commit | 64718c9361636e9750c29da790ddb3a8bfa55f6d (patch) | |
tree | 63b2413d127d0b1403787f8b989471e0ebcfed35 /mk/config.mk | |
parent | 0d74580dd013309f76f82ee1c9572d26a63fc7eb (diff) |
Allow building libutils etc. as shared libraries
When CFG_ULIBS_SHARED=y (default n), build libutils, libmpa/libmbedtls
and libutee as shared libraries (.so). The static archives (.a) are
still produced. The linker uses shared libraries by default when
present so TAs just need to be re-built to use the shared libraries.
For the time being, in-tree TAs are always linked statically for
practical reasons. Indeed, in-tree TAs (such as ta/avb) are likely
to be used as "early TAs". If such a TA was linked against shared
libraries, then those libraries would need to be installed in the
"early TA" area, too. While this works fine technically, it requires
some more steps in the Makefiles to make sure the proper dependencies
are installed and also it would mean that those libraries take
precedence over the ones potentially installed in the REE FS etc.
In other words, it would raise questions that we do not want nor need
to address now.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Diffstat (limited to 'mk/config.mk')
-rw-r--r-- | mk/config.mk | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mk/config.mk b/mk/config.mk index 34e66bfe..96365456 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -346,6 +346,16 @@ $(error Cannot instrument user libraries if user mode profiling is disabled) endif endif +# Build libutee, libutils, libmpa/libmbedtls as shared libraries. +# - Static libraries are still generated when this is enabled, but TAs will use +# the shared libraries unless explicitly linked with the -static flag. +# - Shared libraries are made of two files: for example, libutee is +# libutee.so and 527f1a47-b92c-4a74-95bd-72f19f4a6f74.ta. The '.so' file +# is a totally standard shared object, and should be used to link against. +# The '.ta' file is a signed version of the '.so' and should be installed +# in the same way as TAs so that they can be found at runtime. +CFG_ULIBS_SHARED ?= n + # CFG_GP_SOCKETS # Enable Global Platform Sockets support CFG_GP_SOCKETS ?= y |