mk/lib.mk: use full path to shared library in flags variable
To add link flags for a shared library, a makefile variable is used
that is called lib-ldflags$(libuuid). That's incorrect because the
UUID is not enough to uniquely identify a shared library in the build.
For example when both 32-bit and 64-bit user space is generated there
are two versions of the shared library with the same UUID. It is not
a problem at the moment because lib-ldflags$(libuuid) is used only
for one target: ta_arm64, but fix this anyways so that the variable
may be used for more complex cases.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/mk/lib.mk b/mk/lib.mk
index 30f2040..029260d 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -60,14 +60,14 @@
endif
ifeq ($(CFG_ULIBS_SHARED),y)
ifeq ($(sm)-$(CFG_TA_BTI),ta_arm64-y)
-lib-ldflags$(libuuid) += $$(call ld-option,-z force-bti) --fatal-warnings
+lib-ldflags$(lib-shlibfile) += $$(call ld-option,-z force-bti) --fatal-warnings
endif
$(lib-shlibfile): $(objs) $(lib-needed-so-files)
@$(cmd-echo-silent) ' LD $$@'
@mkdir -p $$(dir $$@)
$$(q)$$(LD$(sm)) $(lib-ldflags) -shared -z max-page-size=4096 \
$(call ld-option,-z separate-loadable-segments) \
- $$(lib-ldflags$(libuuid)) \
+ $$(lib-ldflags$(lib-shlibfile)) \
--soname=$(libuuid) -o $$@ $$(filter-out %.so,$$^) $(lib-Ll-args)
$(lib-shlibstrippedfile): $(lib-shlibfile)