From patchwork Fri Aug 3 14:01:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 143408 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp194751ljj; Fri, 3 Aug 2018 07:01:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeMJOTyGWTTyUpjzQBb611PHj6HLCy82WqJNN4sspPCx23GxXilVjMCNpELCLa9apvkyHJw X-Received: by 2002:a63:de4c:: with SMTP id y12-v6mr3912304pgi.435.1533304896707; Fri, 03 Aug 2018 07:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533304896; cv=none; d=google.com; s=arc-20160816; b=mCJ+a8oH9GVNaUCWFzqztJJgL9y5YBwQu7xK+iY0ZQ7/mp/vGQHCBctTvNXKE0jJhN 4otbS21If2txGgn6PQzY1/er0HU81o6MjjEa9/q7JJG1rx7124tg81os35pChtUlMaBX C2RPgrkgErPISrG7t6CLpwXWjb8yuCb7o9t+WeZ8cscSP8pilESmUb/79o8cX4sf9hbu 2Yc6kVltpSEOXq5l6BSc4l8OSZ/8yE3MU1TUtZWG2Y816aIXtRtU24RFvodWT69idRjy T1ewhKzKJWBh7paEO66iwulCTSzZJcorg0s8uhlj8utwP1IW/ZU0W5LQCJu2u8kyfeLm xvCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=+mE1HwpEFZxolpxn52mmRW8LJVlAlHNrRH2aVPzJvKo=; b=cRQV0HMrj6WN68o0N6x637so14QR15B/YW57ibhRxa1e8F06P54KpmOL/TrKUyQvGS pCLQ9GMNNdg6GfQNzQvidf/2QcVMkU5GZS1olT4bHiQiDgt+bDPWgGITF9AtWag2aAwH vi1pV6KU6QmT85pBl0vgO0iZQ7jQJCSjh7kRanY4PHtkNh5a+yY7GDGDpJA5sRqiOqmv Za8PmU4hXfHsL9ob21UvDiVz3whuIMLeT3D6thXF2DjhSJ1IAWFu8LpWc2HHmYJyOGXV vKFDdb+3UaOlrwHSRNZJQBkiXWiaXgVUCO99OmxGfzce94MITCn7l5moGh7XKpkj0j2I j+Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=vrSrpXdy; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id s17-v6si3813122plr.120.2018.08.03.07.01.36; Fri, 03 Aug 2018 07:01:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=vrSrpXdy; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 3BCA778E35; Fri, 3 Aug 2018 14:01:33 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mail.openembedded.org (Postfix) with ESMTP id 3541C78A02 for ; Fri, 3 Aug 2018 14:01:30 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id h14-v6so5494170wrw.13 for ; Fri, 03 Aug 2018 07:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=58UzkkMlFxOhmJku/UneyoYLHmp1PTluSICvylp9+JU=; b=vrSrpXdyhUNamMG52l7RIzfQ89EQZ0vW6C5GZzJThuhsmoAktjiEkB9X+z8IuRK+iL RpHv9ZSEHV3aZClyhTjiyFFGKBz5CpzubANycIWo/CO/xwqo6WCY21FbNqPPEoODQCTL r06JWAFu2FlbYXIdJ1UwA5N1QKQAHylFXaEm6LC5wpQVRkqCmwAjCNT4AJp77MmfhcmT Ml0Prk45BUxnti/t7KVXHexxGiNy3rLBPQDMAl1k9Lhj/RmeWsbcg5N49ZSJr7rGi240 4Np8CGMzeLLT6OBhXmtgqQmaL0QI0yT4Zf1MqmKTF80tjLHz8YdVGVMHn8Ho6fjvmfn9 rgow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=58UzkkMlFxOhmJku/UneyoYLHmp1PTluSICvylp9+JU=; b=Kd3nR9Ic/R7hlsvn06u5V4CaEJV2oEwZsSjb9KiDohlgpgp5wfTW/r3liPutbNB+rR +FJyl1TW/SIxfqlWlvzIgAsloDw0FVAzzr8l2gQHGhoDOqm0t/SoV0eQ2w1fpAHLeXAv 1piuWLpSm6/lekdYy4o1oyzaGC+lIBfnA264oBJvXKDxYzYFL7q4HfLGUkpxai6uW6tY lk/a0RJCEdwPw0N9ZbJdLGnmRfxZjqWZPZNX515+JPkMoJg1//ngFjOkQx7BjisNTTrL T2HJiW08lDQkM5AzEiUgnwQRhoQRLOo+rcZ6Xwi0nxZ/gMo9WC0Ys6V1KGAM4Pa8zD7D KDWg== X-Gm-Message-State: AOUpUlF0ja+Gm+zmG2rtOEfAhK9Fzm0MRvHKQWLDqOr4NUzPlKiChNxE G7h9V4K4h2/dV8sXv2xZyqUwVvoJ8e4= X-Received: by 2002:adf:dfcd:: with SMTP id q13-v6mr2607484wrn.113.1533304891236; Fri, 03 Aug 2018 07:01:31 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id e141-v6sm7753757wmd.32.2018.08.03.07.01.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 07:01:30 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 3 Aug 2018 15:01:12 +0100 Message-Id: <20180803140115.25450-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH 1/4] cmake: fix linking in multilib SDKs X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org CMake, in it's infinite wisdom, when searching for libraries (using find_library) will look inside the libraries PREFIX/lib, PREFIX/lib32, and PREFIX/lib64. In a multilib SDK more than one of these will exist (potentially all three) and obviously for a given build configuration only one of those is valid. This search path is hard-coded deep inside CMake but by setting CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX we can bypass it and set an explicit lib to use. Do this by writing ${baselib} into the environment file, and then stripping "lib" from this to obtain the suffix in the cmake-specific environment script, which is then read in the CMake toolchain. Signed-off-by: Ross Burton --- meta/classes/toolchain-scripts.bbclass | 1 + meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | 2 ++ meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh | 1 + 3 files changed, 4 insertions(+) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 0ff5301530b..63b07c802f4 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -51,6 +51,7 @@ toolchain_create_sdk_env_script () { echo "export OECORE_NATIVE_SYSROOT=\"$sdkpathnative\"" >> $script echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script echo "export OECORE_ACLOCAL_OPTS=\"-I $sdkpathnative/usr/share/aclocal\"" >> $script + echo 'export OECORE_BASELIB="${baselib}"' >> $script echo 'unset command_not_found_handle' >> $script toolchain_shared_env_script diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake index dc8477ea345..d52c29e5a1c 100644 --- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake +++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake @@ -10,6 +10,8 @@ set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY ) +set(CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX "$ENV{OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX}") + # Set CMAKE_SYSTEM_PROCESSOR from the sysroot name (assuming processor-distro-os). if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+") set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1}) diff --git a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh index 64b6cf3c6a3..7bdb19fb6ce 100644 --- a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh +++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh @@ -1 +1,2 @@ export OE_CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake" +export OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX="`echo $OECORE_BASELIB | sed -e s/lib//`" From patchwork Fri Aug 3 14:01:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 143409 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp195025ljj; Fri, 3 Aug 2018 07:01:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpemvzfOUvAXzAkq+QVT/LpQ5QiA8sjA480mADpeTUTXdP4Wsb4c3zMYHy3k/2YHNz9flnFd X-Received: by 2002:a63:bf08:: with SMTP id v8-v6mr3833202pgf.3.1533304906695; Fri, 03 Aug 2018 07:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533304906; cv=none; d=google.com; s=arc-20160816; b=E/+A+Att0LnLjN48pX6yXtEiNhT2d5nSlQt7pxbduB9kETU+Y5UmTfDlcEFeTUCQEY SC6saE7UUWbqinXeTSc3CzTN9TOuogp5i2nJQaDT2xNs8CHd27w7CMr+3IphkOQ6KgKZ zGMm9SMEY2NrAOJrxhngpcwrMXAU0Kiyk/PEkyAqiCYPT1S8Ve0wGDZfsNesUWnLw6pN HeQFMvm1+8S6uwiaNnFB2S9mGeCpVDykiH4o4iqchX/c7KLdczMzwtamAXBpr+woGj9s YdJl877sRT9xA4u03zcKwlbXiXUvs2d4L7rsg8lJmPhSyF2NgV72aKbgi39CWqEQtmsY eehg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=twCJowQ/C0tdZKgva9nHUfo86UDncdtanRYMymF74p0=; b=oufy2wGc0W4Q5or46goa56j6TsCeI9uo3nGFbXmWZENCmak2B4DZ4cB8MwMfaf7nKW n/8HYF7+b8bjO2V9sjs9EQxPWAPZ95D1WveRAFe66hDYBNWkr2NdXfxgvjD6NG9SGtuM WJ9fM5khTs5xK3x0MLtXmsnBQWBDYspBQ8K+IKg6imjVJeGSn/6LRPwDjDIqCEftgfVG B8fqskX53P+xlGYKtt2VxFiP8kmYEAVAsfK6IrG1ruvmT6Z1uIEDu752qDvbmw+AQa67 Seq6q+9BHISaovOnPkMKMskkTsatX7LPwYzvfrgwT3VDARmiO6CTyxmFnnpJVQDdLwbu VV6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=X25YLl78; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id l15-v6si4763674pgh.593.2018.08.03.07.01.45; Fri, 03 Aug 2018 07:01:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=X25YLl78; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 3626D78E4D; Fri, 3 Aug 2018 14:01:42 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mail.openembedded.org (Postfix) with ESMTP id 1106E78A02 for ; Fri, 3 Aug 2018 14:01:31 +0000 (UTC) Received: by mail-wr1-f45.google.com with SMTP id h10-v6so5518970wre.6 for ; Fri, 03 Aug 2018 07:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=S/3MaBPp0coWRBRu9fSKeg4CC0TDJL+HTrlC3p1OnVM=; b=X25YLl78vqGnXlUulBiGQZPDDVA/E3X16mm+wOTo9NIqrKHDCvUAf4pVbS5QWqmxPg QyU3Rn7of/US45R8k3sVN0BdFKuSc6Ta7pruFqnl7ez4inG7/aelxH9ymYcxMdbgVJYT Btf4PwzlwOHUA9+lTO6FTld6sBr4eKro4nE9ocMQy3rn13/7QRtGsNPzMKc1QuUKnjnJ twQNH6ZgyaILhfWY30ryJmkUTHo3HL6n8KdxnQCLJSEHy/mxgWrjsoxL58RWzFaEHeVO 8omKF+CN6FnujIUP7bZ7+whal2FEp6EtecqBqhm0QjVOyS6+80tqktH0RP+ePRFVThtV Jo4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=S/3MaBPp0coWRBRu9fSKeg4CC0TDJL+HTrlC3p1OnVM=; b=H4rlCC24jbOzdsJ8XrNMhwynZS9V0gtBdCZKdBXW123BL+0tbfO51AFBUVhao+nr0n tLfE5OSuzjp4AQ3AlEzkIpY/6D+eoC9cBms/MRFcuIX85YH0ljdIi2mtxSobDjs5EZNI +uzCaMMvgXjGij0DqvYOPAofbgYnx5AOPKztZCRjgd2pLRiByYM0H114MJPwYtH+3Yfi vEYfDfEWLC0kqgVKw7dN/TWja09HHzN4SPLpGkJicbjYMZ1CzQ5bkLKdzkHAo74z1G/z +HRVf2oCfpcmieSnz8L576Xt0p0/h/6cLR9or+EsAuNOMUmHWYhadGChN28Afe31s8Qf TRwA== X-Gm-Message-State: AOUpUlHMM4iCnXSmIRDCaOZYbh4i1yiayB/cZtX1+MV5uBtNJpNhXoY6 MDvDFDDUhMZZaWw8sBCn7cfVRGS5Lrg= X-Received: by 2002:adf:f342:: with SMTP id e2-v6mr2653370wrp.161.1533304892493; Fri, 03 Aug 2018 07:01:32 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id e141-v6sm7753757wmd.32.2018.08.03.07.01.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 07:01:31 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 3 Aug 2018 15:01:13 +0100 Message-Id: <20180803140115.25450-2-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180803140115.25450-1-ross.burton@intel.com> References: <20180803140115.25450-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 2/4] toolchain-scripts: put TARGET_ARCH and TARGET_OS into environment X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org It's useful for the SDK to know exactly what TARGET_ARCH and TARGET_OS are, specifically for SDK QA. Signed-off-by: Ross Burton --- meta/classes/toolchain-scripts.bbclass | 3 +++ 1 file changed, 3 insertions(+) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index 63b07c802f4..6d1ba69473a 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -52,6 +52,9 @@ toolchain_create_sdk_env_script () { echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script echo "export OECORE_ACLOCAL_OPTS=\"-I $sdkpathnative/usr/share/aclocal\"" >> $script echo 'export OECORE_BASELIB="${baselib}"' >> $script + echo 'export OECORE_TARGET_ARCH="${TARGET_ARCH}"' >>$script + echo 'export OECORE_TARGET_OS="${TARGET_OS}"' >>$script + echo 'unset command_not_found_handle' >> $script toolchain_shared_env_script From patchwork Fri Aug 3 14:01:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 143410 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp195153ljj; Fri, 3 Aug 2018 07:01:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcAce+3nP/sCMIOIdEFt9iTwszIAF0rbyGrLm5++sDy3UykriQRM2S18NFR6tEaiRbHT5WV X-Received: by 2002:a17:902:4203:: with SMTP id g3-v6mr3808147pld.30.1533304911331; Fri, 03 Aug 2018 07:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533304911; cv=none; d=google.com; s=arc-20160816; b=dBvB5sM7FUmJBuzhJEO4mOd8QiL4LPijjU/oxGaQMdmAejUqhky5wgg1+R9TwcJxFc WjWEv9lqPwgcqvg3QhkYIw0HDvO8T1O45ttlOBGyKDNhuZO6ld60yvwwKqguUcyqpA/P k9SSClUntcH8Hf71mc179FGY+xkWKraxV19n+Fteb0NVw+AV3OOoS73fHb9R0V3A/g9R /SJSNaDJ0bdSwIOZwPghMPLb2e6rQVUMB9OLZFBQwOoZ2D9KNAPQH8u1NyRpHDhb3LeI qfY0D0VVPrUVVp5tQB1qSFONlWSYm+PabvgIii6PRYFJ2pbBfYb9QRp+xR0djJ/CrsrL xwTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=8gCDYBTYU3mQP0xaJahntBmZnelWpLCUoUFc3Tkrfn4=; b=BO1JReGeo428YMAvVGhwPA7dS8Sur/RtuAC0keK9xG55Kw4Ey3wGHDmLyCiaK5gLgK 1Zpo8lohIMMR3RyzHb5MFfVZcsoyB2TdlYeSPk6mYuzg+JZsWz9+ee/Xv8ucCbMRPSxO vgAVy56MhcsOWr8qTdQ/KEzl9z1loTYmV0cWDonX6eSzZ2qn3hfVmlWba2zdhFlG9bOu j4uQ/mrlIbHWXkeDJBM+t5obG3u4qvfTqDTkB1yU5Zb9w205I6kotLue8oA8M4cPK2AP jjnSVt46zVVbQcQM39rsIqGj/Ry2Q1VA4TPgMw3DWEnM6+OJ3LssffGOktyTBy20ni6c cYAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=GMJ1DgU+; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id c62-v6si5804496pfb.98.2018.08.03.07.01.51; Fri, 03 Aug 2018 07:01:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=GMJ1DgU+; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 78ED478E55; Fri, 3 Aug 2018 14:01:43 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by mail.openembedded.org (Postfix) with ESMTP id E369D78E44 for ; Fri, 3 Aug 2018 14:01:33 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id o11-v6so6365981wmh.2 for ; Fri, 03 Aug 2018 07:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=TazkE46S03FCSS2T3yNjD7nBkFlWlQuoklXODmLoMJc=; b=GMJ1DgU+Mh3mYXa7T2o2Zizus4d1FjL+G2aYrl7wsg2NP6C5YaSMfsAP5McBMWGHmf Li75/mBPE3fMJUsfrk7Ydg7e+ocmDQCOh6h5+Xnvm4AfZU8osg8Bt4OqHnQ5lOoO5P1t of8rsdJiDQpdoJC+bvZ5ralsRsB9JmVHttr2yG8WIYimEMl/by0+mW0qzgPOeA0UoFXR sQcsNA4WCAopf4zGDHTIb68L64VRNYtecrJi2Mg168857N2WXo4MGHo1+QUqBoUFEDGT SmtNtAKK45Z2ed8N/ZCis8lO8vx6buKI0sCpk7kbxaXLoOENO7B+ftJtynO79sHyCtiT SyjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=TazkE46S03FCSS2T3yNjD7nBkFlWlQuoklXODmLoMJc=; b=rBDWv9ENwDhi+r9/2plIXBs30P0/cB91UiODZX8kjrdVUi5q1++NSJv5wzU9x4HylT id5rAeA5FB/Nk74cY01IjcE+itUt53wKzZvG51KlF/wn6jvxflqjUvboR9r12UZj8lUj tK4TkbBZvkDGYqMGK2uqWL1eyS36STgV+UB5nFBYSarqGBi/6gbr3QQREzo16TQwK+bD JUXjQB6+G74I2Rki1U21jpurKikk9wHLZ7jqIgPXjuwkJV2jXizAnAN4TPG+YwkWPaW1 N2HY8KFUO3sxpBbbPw37/2BXb91LzTDVONzpM4HN4BeJ3xQ8RBhGASkkldwNeu99CdFW eZgw== X-Gm-Message-State: AOUpUlET3JpOFvw+kW5GVc/7YRxq5aOuPL2BbTG445AlRUSQwuJySFFK wcGDw8OZkqKnr70BNLRWmF0stb0OhB0= X-Received: by 2002:a1c:415:: with SMTP id 21-v6mr5316448wme.128.1533304893940; Fri, 03 Aug 2018 07:01:33 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id e141-v6sm7753757wmd.32.2018.08.03.07.01.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 07:01:33 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 3 Aug 2018 15:01:14 +0100 Message-Id: <20180803140115.25450-3-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180803140115.25450-1-ross.burton@intel.com> References: <20180803140115.25450-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 3/4] oeqa/sdk: add test that CMake works X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Add a new SDK testcase that builds assimp, a project that uses cmake. Using TARGET_ARCH and TARGET_OS which is now exported into the environment, check that the generated binaries match the ELF headers we expect. Signed-off-by: Ross Burton --- meta/lib/oeqa/sdk/cases/assimp.py | 68 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 meta/lib/oeqa/sdk/cases/assimp.py -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/assimp.py new file mode 100644 index 00000000000..7251bdf34e7 --- /dev/null +++ b/meta/lib/oeqa/sdk/cases/assimp.py @@ -0,0 +1,68 @@ +import os, subprocess, unittest +import bb +from oeqa.sdk.case import OESDKTestCase +from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject + +from oeqa.utils.subprocesstweak import errors_have_output +errors_have_output() + +class BuildAssimp(OESDKTestCase): + """ + Test case to build a project using cmake. + """ + + td_vars = ['DATETIME', 'TARGET_OS', 'TARGET_ARCH'] + + @classmethod + def setUpClass(self): + if not (self.tc.hasHostPackage("nativesdk-cmake") or + self.tc.hasHostPackage("cmake-native")): + raise unittest.SkipTest("Needs cmake") + + def fetch(self, workdir, dl_dir, url, archive=None): + if not archive: + from urllib.parse import urlparse + archive = os.path.basename(urlparse(url).path) + + if dl_dir: + tarball = os.path.join(dl_dir, archive) + if os.path.exists(tarball): + return tarball + + tarball = os.path.join(workdir, archive) + subprocess.check_output(["wget", "-O", tarball, url]) + return tarball + + def test_assimp(self): + import tempfile + import oe.qa, oe.elf + + with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir: + dl_dir = self.td.get('DL_DIR', None) + tarball = self.fetch(testdir, dl_dir, "https://github.com/assimp/assimp/archive/v4.1.0.tar.gz") + subprocess.check_output(["tar", "xf", tarball, "-C", testdir]) + + sourcedir = os.path.join(testdir, "assimp-4.1.0") + builddir = os.path.join(testdir, "build") + installdir = os.path.join(testdir, "install") + bb.utils.mkdirhier(builddir) + + self._run("cd %s && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON %s " % (builddir, sourcedir)) + self._run("cmake --build %s -- -j" % builddir) + self._run("cmake --build %s --target install -- DESTDIR=%s" % (builddir, installdir)) + + elf = oe.qa.ELFFile(os.path.join(installdir, "usr", "local", "lib", "libassimp.so.4.1.0")) + elf.open() + + output = self._run("echo $OECORE_TARGET_OS:$OECORE_TARGET_ARCH") + target_os, target_arch = output.strip().split(":") + machine_data = oe.elf.machine_dict(None)[target_os][target_arch] + (machine, osabi, abiversion, endian, bits) = machine_data + + self.assertEqual(machine, elf.machine()) + self.assertEqual(bits, elf.abiSize()) + self.assertEqual(endian, elf.isLittleEndian()) + + @classmethod + def tearDownClass(self): + self.project.clean() From patchwork Fri Aug 3 14:01:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 143411 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp195349ljj; Fri, 3 Aug 2018 07:01:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeC0P056TtASFEk2vJnhvSVpxEDhQCKIV17u62KZ6mDmdpRKot+kr4riOL0IYUR01XCXJ4v X-Received: by 2002:a63:524e:: with SMTP id s14-v6mr4000522pgl.35.1533304918049; Fri, 03 Aug 2018 07:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533304918; cv=none; d=google.com; s=arc-20160816; b=Zh/gd856teVhrOeUjOZ35lkyl/tr9hXu+5o7LGmq3nvIBhuZ9Q2Ei+cz05gLbelLgs 8/eevvDGk9qwBwnLuWnqGhK75YX54LK3EbuyZRHPRfi/iiuWuL96ACnJzJ5wF5izDEQ7 Zmn0A5TZ8fIiRZB/UrTlt+Lk12W/ymYFkvsgIttqYJ9dbO1rNxMNNlT/tHEOlVVC3dhU 363miBO0FYbtf1PRbCJDX/Mtug0WwI8crgt+s55CMklEuqU+q58Q9nl1/oBLzkfvJqWI zO1ssMRYPsEKXEGSX6v82ClGQqq3VSUpOrMP/xOibyrCa/2SovHI+3TOvNcTY1oEa43Y Hmsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=UxQ2R9bZdxamiXlNOrMw6ORcFC++55/tCjLwuyUuK/w=; b=ivxBmxJH3rcDbxDE5fyagi2ZaaIry+q3qTvB7rU3EKh80b8RsASyT1dCX27PVDNLWj d1jmvSbKzs5R7RY2+eFgGrD91Ts6qykX8r7dis6X+/+DT8+UpMbtsaiwTO0NmlOnz11l URBJ1MM8F7Ro6qUCbOJE30pKJ5Ms9CMGMl+cPWkeRwxxEBjEHG9scBIStWpEknovTAn9 wIxerElJLIo5zJJPjo0MHB+U0MHdwewERlRJ6rZgIq7mPW34fRLYo3NFg6hl/BKlUnv0 AYYem1G3nfmCwU5ktmVIHNwsY8Mm7HUBl5GVag/2j4yQTc3uNHyAl+gXpaZKlG3f+1MI 9koQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NW4UZhNR; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id q16-v6si5435394pfi.183.2018.08.03.07.01.57; Fri, 03 Aug 2018 07:01:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NW4UZhNR; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id B519E78E5A; Fri, 3 Aug 2018 14:01:44 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mail.openembedded.org (Postfix) with ESMTP id F324678E46 for ; Fri, 3 Aug 2018 14:01:34 +0000 (UTC) Received: by mail-wr1-f54.google.com with SMTP id h10-v6so5519116wre.6 for ; Fri, 03 Aug 2018 07:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=5ec7BOqOiWRTYPno86hOU3jwFRmK4PAsXD/FwfadX9M=; b=NW4UZhNR/iK+kUCFp2w+AiYOf+26ubIrYBmw7axcHSaWgXB9NqbxSgJfJvO7gpWlNT RMr4L1FC8hGI/HdpfTtR1gDUJ+bOVHSj2yJH2X1DzMuaRWDo2grHzZTYgQQgLuXNCXJq hQnt08jZ6iU67Tk14bsE8M1wb4ApnaNwSsDxziHBbg8G2vnTXm3t/a+cFjbu81WWA05S 9dsJ2oTgZkeqnzp/GiNmPXEh5KTpg5eiE/YiaHTUTMxOO4SNB/VIPiedC/pWZ6W+1CAI sMHYKb0InZD2SHA2GlPzr4hmogZxrCM3pQpJfOT53RTgZogGs7ypTBX0LGRa06aLs85l YURA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=5ec7BOqOiWRTYPno86hOU3jwFRmK4PAsXD/FwfadX9M=; b=P4rMyuOkv9mpdvQqkbHc2otjjK1IVwW2V6ztcJnLEhQ/qg6u2QvTIJdlX1eNxJ7Urr 8T7na8sovJiixQL1BMQ0d3ZwMysm81sGNYqzmmOoN5xxJ1p1+A/vkcZSSQ1DH7j8+I0q Dq67EU2wRaKiWirRGRAwhD/xXW2X2Y+zeKTR7S+vXTYO4HrVkIVR+s1ccQ8PFsE1GdvN GqJHp1f6TDDqiZ43h0uWqR9VtNCf2PHrWpfGfqolrMwdU0zZZraXAZBZLokNv1DnWv3f Vdvv67+qaUwHw4PqvoecaNEUTvwdHSHNUJfvjANb8VE7GLj2ZQWwQk6CIjydoeGGI+3+ 4vQg== X-Gm-Message-State: AOUpUlEA2F8H0LZ/mg0h+hsxBc4s7yq+g/E3wHVZlXH6pBXzbNzcusF6 MIMfd7Q6bAwkq+OGwACVElK17iFl0vA= X-Received: by 2002:adf:b519:: with SMTP id a25-v6mr2778729wrd.273.1533304895343; Fri, 03 Aug 2018 07:01:35 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id e141-v6sm7753757wmd.32.2018.08.03.07.01.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 07:01:34 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 3 Aug 2018 15:01:15 +0100 Message-Id: <20180803140115.25450-4-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180803140115.25450-1-ross.burton@intel.com> References: <20180803140115.25450-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 4/4] desktop-file-utils: allow target/nativesdk build, not just native X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Also fix the license, as this is GPLv2+ not just v2. Signed-off-by: Ross Burton --- ...le-utils-native_0.23.bb => desktop-file-utils_0.23.bb} | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) rename meta/recipes-devtools/desktop-file-utils/{desktop-file-utils-native_0.23.bb => desktop-file-utils_0.23.bb} (58%) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb b/meta/recipes-devtools/desktop-file-utils/desktop-file-utils_0.23.bb similarity index 58% rename from meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb rename to meta/recipes-devtools/desktop-file-utils/desktop-file-utils_0.23.bb index 54daabef56c..6446f47189d 100644 --- a/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb +++ b/meta/recipes-devtools/desktop-file-utils/desktop-file-utils_0.23.bb @@ -1,18 +1,19 @@ SECTION = "console/utils" SUMMARY = "Command line utilities for working with *.desktop files" HOMEPAGE = "http://www.freedesktop.org/wiki/Software/desktop-file-utils" -LICENSE = "GPLv2" +LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -DEPENDS = "glib-2.0-native" - -SRC_URI = "http://freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${PV}.tar.xz" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://src/validator.c;beginline=4;endline=27;md5=281e1114ee6c486a1a0a4295986b9416" +SRC_URI = "http://freedesktop.org/software/${BPN}/releases/${BP}.tar.xz" SRC_URI[md5sum] = "599133d51cc9a41bfec186414906b6f1" SRC_URI[sha256sum] = "6c094031bdec46c9f621708f919084e1cb5294e2c5b1e4c883b3e70cb8903385" -inherit autotools native +DEPENDS = "glib-2.0" -S = "${WORKDIR}/desktop-file-utils-${PV}" +inherit autotools pkgconfig EXTRA_OECONF += "ac_cv_prog_EMACS=no" + +BBCLASSEXTEND = "native nativesdk"