2d242e0e56
Patch current optee-client 3.4.0 to support building resources with static linkage of executable binaries with the user libraries. The optee-client patch is under review in the OP-TEE project [1] and should be merged in the next OP-TEE release 3.5.0. This change drops !BR2_STATIC_LIBS constraint on package optee-client and its dependent packages that are optee-benchmark, optee-examples, and optee-test. [1] https://github.com/OP-TEE/optee_client/pull/147 Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
52 lines
2.2 KiB
Diff
52 lines
2.2 KiB
Diff
From 857ed6a900e2f16035a88e73e47d79e9251f6544 Mon Sep 17 00:00:00 2001
|
|
From: Etienne Carriere <etienne.carriere@linaro.org>
|
|
Date: Fri, 1 Mar 2019 12:31:48 +0100
|
|
Subject: [PATCH] cmake: support BUILD_STATIC_LIBS/BUILD_SHARED_LIBS
|
|
|
|
CMake variables BUILD_STATIC_LIBS and BUILD_SHARED_LIBS
|
|
set constraints on libraries and executable linkage.
|
|
|
|
With this change OP-TEE client CMake script builds and installs the
|
|
embedded files with the expected linkage configuration.
|
|
|
|
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
|
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
|
|
---
|
|
libteec/CMakeLists.txt | 5 +++--
|
|
tee-supplicant/CMakeLists.txt | 2 +-
|
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/libteec/CMakeLists.txt b/libteec/CMakeLists.txt
|
|
index 3ec8f66..e3495fb 100644
|
|
--- a/libteec/CMakeLists.txt
|
|
+++ b/libteec/CMakeLists.txt
|
|
@@ -33,7 +33,7 @@ endif()
|
|
################################################################################
|
|
# Built library
|
|
################################################################################
|
|
-add_library (teec SHARED ${SRC})
|
|
+add_library (teec ${SRC})
|
|
|
|
set_target_properties (teec PROPERTIES
|
|
VERSION ${PROJECT_VERSION}
|
|
@@ -71,4 +71,5 @@ target_link_libraries (teec
|
|
################################################################################
|
|
# FIXME: This should in someway harmonize with CFG_TEE_CLIENT_LOAD_PATH
|
|
# FIXME: Should we change this to /usr/local/lib?
|
|
-install (TARGETS teec DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
+install (TARGETS teec LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
|
diff --git a/tee-supplicant/CMakeLists.txt b/tee-supplicant/CMakeLists.txt
|
|
index d2d3afd..e663be9 100644
|
|
--- a/tee-supplicant/CMakeLists.txt
|
|
+++ b/tee-supplicant/CMakeLists.txt
|
|
@@ -85,4 +85,4 @@ target_link_libraries (${PROJECT_NAME}
|
|
################################################################################
|
|
# Install targets
|
|
################################################################################
|
|
-install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_SBINDIR})
|
|
+install (TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
|
|
--
|
|
1.9.1
|
|
|