From patchwork Mon Jan 7 16:38:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 154912 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3674507ljp; Mon, 7 Jan 2019 08:38:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN6FynTNLL97skTJbITyMLoGfflosMhIXNqbcvLNoVoz4XBjZViyCwx1bumvZm2k5kPn7DN1 X-Received: by 2002:a63:d818:: with SMTP id b24mr29948953pgh.174.1546879139543; Mon, 07 Jan 2019 08:38:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546879139; cv=none; d=google.com; s=arc-20160816; b=LoqPV/jx+/ezUQu1g6tq+NYL/fHkp0/WD0UOUrzCc2hD0H1CMwvIQKlG7cvMDZyLJa jbfqcV5mGHfsJQJfQHfepVfrG1JN4b8Vew0yTZGFPxhBgKmHgVuMuQdwX9l0FskFyZB/ pyY7TFR++kNi74aOnI8LrulKsc/b2GUNW2MDF6MmSAdHrFcbxdMsX3CbRyKeYc+aWZHj SIqbxoPqZ2sNogZ5s5eCqF66aN4bj/juhio/c/Te8APkifyoD3vganksZvPAMkMKPJEe w5muB4gUSH3hDSD9iuDesUr6ZGD9Pq9VaIotS9qRKF1iwcnASpcRw9njwGFyZGZZ/Jrs z7Nw== 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; bh=wEOrXEqMfRkJbwgp4JxtEDbu/oJjXJll+K/O6Y1+V0E=; b=QdbHsqRFn2BSEUU26rT9XkgydUK1Ipnm7caASwNWTxKJl8nH6wd4MfG/ImHMTRcVzZ B1f+8HC63Z9eq/ATM9ZbZ9XmmyT8tBgM7eelnzwRLbXuaampCeKy9cVsUsWLUDykNdUe NZYqWvMGYCgy4/O5uGEA7Bob2Z1F7z9egPNqIrPwdL12Hx8h8FwBDmhL2J89A5yqKHP2 SjrCoYYn1y/hlkwN/EGOYchbbNjpUCSak5TCzkq/srHsm/Z9dhbGozlWoOiZ7XOwxTb+ VHRIULxvR6S0a/rkCDUywKnzNeUwm/UlvYKGrAg584QMl+djs7juOlHrJPNKnjNoS9nn MDYQ== 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=AnNTR0CF; 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 4si64864371pfg.280.2019.01.07.08.38.59; Mon, 07 Jan 2019 08:38:59 -0800 (PST) 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=AnNTR0CF; 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 165.28.230.35.bc.googleusercontent.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id E74F37BF0F; Mon, 7 Jan 2019 16:38:56 +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 70C7C7BEE1 for ; Mon, 7 Jan 2019 16:38:34 +0000 (UTC) Received: by mail-wr1-f54.google.com with SMTP id r10so1065656wrs.10 for ; Mon, 07 Jan 2019 08:38:35 -0800 (PST) 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=KcT5hiZaJ5mqj6bj8rFqNKTWG33mc5itbB+cUY3dh/c=; b=AnNTR0CFFsvx1vj6NOgt4ZwXkPjo0pE8oahJsqqmrm1LTGl+YKTGNQFJiYM8z1jMvb QLUTB3f0Vtq+YLJLm2ILK9ZqH7vHIqNwZf/yBEaXCjjPak23AqiqPyw7zuYWeRHJV6dU oI7x7hzZSH/zsZtbnH7kaWd81xZV5IdXADHLoBH88BjXHue3HE4VteSdS9Iu29LXwVrx dvoxt8vhvc+uHtXaaXo1blVNPMeVCUPIi8q6PT+qJSubVLMt/NuuE3QJ5Zzpnb2592Tn JSCvTIYK7sDSu7VOXa1v5Yd6bS8r8uppTxWdr1hlz2Pbfo7refqyktj7u4JwMPYMNujy rUlg== 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=KcT5hiZaJ5mqj6bj8rFqNKTWG33mc5itbB+cUY3dh/c=; b=Hv/d9Xxl/etxgQrvWqCpZi7qEjHZg7eUfHETbcg9W4HRS460hZn2RC7xAyrCsP/Z38 3GcwYOUnVXeZOlWWo4PBNlg17lKfxDYs2wATA+slAzWAxoteFiUeLK00jkNCmMBSMdMz G1G/ZM8iODb9jJqnkhj8tLptTPX5CqAZPkCEBmk7SYuREgMtsjj29LxOwhPFlRiUoYXq DRSWUYaPBImPxWL0jVALVGYmPlQ2RgCGYF4Qg3BgX5WNDQGOwJBbixXK3JIVHZ3SqgWq WO5YrrZ+efSG3ahmkrtbA8QadLEi2ZPcVppQdzZVBN3YC8neoVk9sqbkiAxkidTfVY/2 /QVA== X-Gm-Message-State: AJcUukfsMa+EdBEcPcEwQfd2p1cWtuJ4AHQ1wK8V/k8whDQPExsonx5M HlyucRR9TCmuAtCOPUaBlOfYIcEVEm4= X-Received: by 2002:adf:f1cb:: with SMTP id z11mr44768728wro.35.1546879114726; Mon, 07 Jan 2019 08:38:34 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id o5sm13918958wmg.25.2019.01.07.08.38.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 08:38:34 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 7 Jan 2019 16:38:18 +0000 Message-Id: <20190107163823.31816-2-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190107163823.31816-1-ross.burton@intel.com> References: <20190107163823.31816-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 2/7] meson: use a sensible default for libdir when cross-compiling 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 If --libdir isn't passed to Meson a default is used, but as this default value changes depending on the host (whether it is Debian-like, or has /usr/lib64) this isn't appropriate for cross builds. Signed-off-by: Ross Burton --- meta/recipes-devtools/meson/meson.inc | 1 + .../meson/meson/cross-libdir.patch | 41 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 meta/recipes-devtools/meson/meson/cross-libdir.patch -- 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/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc index ef8c5aefa52..d37afc3b0dc 100644 --- a/meta/recipes-devtools/meson/meson.inc +++ b/meta/recipes-devtools/meson/meson.inc @@ -11,6 +11,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P file://0003-native_bindir.patch \ file://0001-python-module-do-not-manipulate-the-environment-when.patch \ file://disable-rpath-handling.patch \ + file://cross-libdir.patch \ " SRC_URI[sha256sum] = "fb0395c4ac208eab381cd1a20571584bdbba176eb562a7efa9cb17cace0e1551" SRC_URI[md5sum] = "3c35b91e8040901034809576d54007c6" diff --git a/meta/recipes-devtools/meson/meson/cross-libdir.patch b/meta/recipes-devtools/meson/meson/cross-libdir.patch new file mode 100644 index 00000000000..2bd4fb3f9e3 --- /dev/null +++ b/meta/recipes-devtools/meson/meson/cross-libdir.patch @@ -0,0 +1,41 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From ce24f0d6a9be22ba61d80cd254e0409de2eaffd7 Mon Sep 17 00:00:00 2001 +From: Jussi Pakkanen +Date: Thu, 27 Dec 2018 23:43:35 +0200 +Subject: [PATCH] Default libdir is "lib" when cross compiling. Closes #2535. + +--- + docs/markdown/snippets/crosslib.md | 7 +++++++ + mesonbuild/coredata.py | 8 ++++++++ + run_unittests.py | 13 +++++++++++++ + 3 files changed, 28 insertions(+) + create mode 100644 docs/markdown/snippets/crosslib.md + +diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py +index d70c23038c..4e2f3e008c 100644 +--- a/mesonbuild/coredata.py ++++ b/mesonbuild/coredata.py +@@ -299,6 +299,7 @@ def __init__(self, options): + # Only to print a warning if it changes between Meson invocations. + self.pkgconf_envvar = os.environ.get('PKG_CONFIG_PATH', '') + self.config_files = self.__load_config_files(options.native_file) ++ self.libdir_cross_fixup() + + @staticmethod + def __load_config_files(filenames): +@@ -348,6 +349,13 @@ def __load_cross_file(filename): + + raise MesonException('Cannot find specified cross file: ' + filename) + ++ def libdir_cross_fixup(self): ++ # By default set libdir to "lib" when cross compiling since ++ # getting the "system default" is always wrong on multiarch ++ # platforms as it gets a value like lib/x86_64-linux-gnu. ++ if self.cross_file is not None: ++ self.builtins['libdir'].value = 'lib' ++ + def sanitize_prefix(self, prefix): + if not os.path.isabs(prefix): + raise MesonException('prefix value {!r} must be an absolute path'