From patchwork Fri Mar 1 16:47:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 1050302 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="oMWT5pIg"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 449wMB2fCpz9s8m for ; Sat, 2 Mar 2019 03:47:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E40DF86FE5; Fri, 1 Mar 2019 16:47:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TV4hyiDl6Mm4; Fri, 1 Mar 2019 16:47:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id A98BF8701C; Fri, 1 Mar 2019 16:47:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 739771BF2B6 for ; Fri, 1 Mar 2019 16:47:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7063686FDD for ; Fri, 1 Mar 2019 16:47:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KgCfboJ2cNI2 for ; Fri, 1 Mar 2019 16:47:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by whitealder.osuosl.org (Postfix) with ESMTPS id EA33086ED3 for ; Fri, 1 Mar 2019 16:47:23 +0000 (UTC) Received: by mail-wr1-f48.google.com with SMTP id r5so26568707wrg.9 for ; Fri, 01 Mar 2019 08:47:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=gDqaxORBWby784dwptIV2Axyw5WpPCjykabDG+dMAFA=; b=oMWT5pIgGkWe587feW9GjBcC1nbS3he/YMO9gPRw6ECEuu02acEnU/4QBoDDmKdjY2 Ewc6Z/vfsvfM/bCM0o55OR/IcTsuKffecnM+SljXdKA2eqPLBExqhz5lqTN0zZPpfS7w eV1CWcRIGrHyKoI6J7P2TrQMizVRfxWhnPTb68/89A5dXrpJTcCDsTRtjqCLMBX7XudV rPzsy72k4GB1P4GxqPXgHk6bduY50xI7n86uQBjOncwrdr/opAm0vofOsf2o+BXy+OvY FVl+zNivk7wHQkVZ0Tmj5a8UmNX1zM3JE+RMACxlCl+rJPmXjh0Y1gXpgkkDk/a5XgBj uAqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=gDqaxORBWby784dwptIV2Axyw5WpPCjykabDG+dMAFA=; b=p7OA3pStxphkbUEcToEIbwHhYhIktkUAXLgAFVjQDcFzbtgpWPtcq5Pe4si1yCSUix d4FQVgIRYgU/grysgv1peZIzL/B6zBGlxhPvDq1NKWLTPJEvrRR9uRp5ffkfYsNHKmCo E/KHdt955e7l7ng69dvy4HqvZlisxaQgu4F0bDeFFqJ3zEBc1v4nevbIr1Dg76b97RtR GBn/AUoXI5ilfoAxbYOwcKKTtprvHd9M6xSR6Z/09Vmkh2k4e0o30NQpXFobKB4ePw33 YacBAArvT+l9MZIbRGMZorgvNYRsPF2iXeDOEWq8gjRDmxNvJH2Wb49XMW+ePuLOxYKQ VIzA== X-Gm-Message-State: APjAAAUHe231UKAPG+VPVXAlsC9DKPBjYInGrCndJpOvsamqEiWzYB4K s19Mix0KqcKB8lapa+/HD4gXFZqFm2s= X-Google-Smtp-Source: APXvYqyOllxNB+YDNsj1wuzR6RJZVBaYBAFDiRcitNQIjNFTAP+q4cVt0KIBYX8O/htYfBDpLcBBaw== X-Received: by 2002:adf:e641:: with SMTP id b1mr4014743wrn.213.1551458842278; Fri, 01 Mar 2019 08:47:22 -0800 (PST) Received: from lmenx29q.lme.st.com. ([80.215.103.67]) by smtp.gmail.com with ESMTPSA id l18sm20826744wrv.20.2019.03.01.08.47.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Mar 2019 08:47:21 -0800 (PST) From: Etienne Carriere To: buildroot@buildroot.org Date: Fri, 1 Mar 2019 17:47:09 +0100 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Subject: [Buildroot] [PATCH/next 5/9] package/optee-client: support BUILD_STATIC_LIBS X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Etienne Carriere MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Patch optee-client from release 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. [1] https://github.com/OP-TEE/optee_client/pull/147 Signed-off-by: Etienne Carriere --- .../0001-libteec-fix-build-warnings.patch | 4 +- ...pport-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch | 51 ++++++++++++++++++++++ package/optee-client/Config.in | 4 -- 3 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 package/optee-client/0002-cmake-support-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch diff --git a/package/optee-client/0001-libteec-fix-build-warnings.patch b/package/optee-client/0001-libteec-fix-build-warnings.patch index 21f47ec..aec07b4 100644 --- a/package/optee-client/0001-libteec-fix-build-warnings.patch +++ b/package/optee-client/0001-libteec-fix-build-warnings.patch @@ -1,7 +1,7 @@ -From 657414ccd20b4fb2985efd83b0679964fec923c2 Mon Sep 17 00:00:00 2001 +From 2f5ab18b4886b31a33850ee51f33fb753e9c7b7f Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Fri, 1 Mar 2019 09:36:46 +0100 -Subject: [PATCH] libteec: fix build warnings +Subject: [PATCH 1/2] libteec: fix build warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/package/optee-client/0002-cmake-support-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch b/package/optee-client/0002-cmake-support-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch new file mode 100644 index 0000000..f63f1a3 --- /dev/null +++ b/package/optee-client/0002-cmake-support-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch @@ -0,0 +1,51 @@ +From 857ed6a900e2f16035a88e73e47d79e9251f6544 Mon Sep 17 00:00:00 2001 +From: Etienne Carriere +Date: Fri, 1 Mar 2019 12:31:48 +0100 +Subject: [PATCH 2/2] 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 +Signed-off-by: Etienne Carriere +--- + 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 + diff --git a/package/optee-client/Config.in b/package/optee-client/Config.in index db0b7b7..0de136c 100644 --- a/package/optee-client/Config.in +++ b/package/optee-client/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_OPTEE_CLIENT bool "optee-client" - depends on !BR2_STATIC_LIBS help Enable the OP-TEE client package that brings non-secure client application resources for OP-TEE support. OP-TEE @@ -12,6 +11,3 @@ config BR2_PACKAGE_OPTEE_CLIENT and invoked by the secure world. https://github.com/OP-TEE/optee_client - -comment "optee-client needs a toolchain w/ dynamic library" - depends on BR2_STATIC_LIBS