summaryrefslogtreecommitdiffstats
path: root/patches/optee-client-2.4.0/0002-libteec-Makefile-create-relative-links-to-shared-lib.patch
blob: 0b9efe3942a11872b2e6bf8a7da9b23a6024e8ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Mon, 12 Jun 2017 17:55:32 +0200
Subject: [PATCH] libteec/Makefile: create relative links to shared library
 instead of absolute ones

Absolute paths in link targets are ugly and there is always a risk that
they may be packaged incorrectly. Further the *.so* files are always
expected to reside in the same directory. This patch fixes this problem.

Suggested-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 libteec/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libteec/Makefile b/libteec/Makefile
index 66055a723a2d..f40898569e9e 100644
--- a/libteec/Makefile
+++ b/libteec/Makefile
@@ -33,8 +33,8 @@ TEEC_LFLAGS    := -lpthread
 TEEC_LIBRARY	:= $(OUT_DIR)/$(LIB_MAJ_MIN)
 
 libteec: $(TEEC_LIBRARY)
-	$(VPREFIX)ln -sf $(TEEC_LIBRARY) $(OUT_DIR)/$(LIB_MAJOR)
-	$(VPREFIX)ln -sf $(OUT_DIR)/$(LIB_MAJOR) $(OUT_DIR)/$(LIB_NAME)
+	$(VPREFIX)ln -sf $(LIB_MAJ_MIN) $(OUT_DIR)/$(LIB_MAJOR)
+	$(VPREFIX)ln -sf $(LIB_MAJOR) $(OUT_DIR)/$(LIB_NAME)
 
 $(TEEC_LIBRARY): $(TEEC_OBJS)
 	@echo "  LINK    $@"