From patchwork Tue Sep 25 13:43:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 147430 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp748120lji; Tue, 25 Sep 2018 06:44:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV63xAI9lYe30kgWWRsVckLjUJaJhvDIloIQ4UTgMR/fnhYeMPjTrAsbJKvgZv0hhsEdRKEWp X-Received: by 2002:a63:6203:: with SMTP id w3-v6mr1183565pgb.53.1537883060906; Tue, 25 Sep 2018 06:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537883060; cv=none; d=google.com; s=arc-20160816; b=faEaoz5hyltl0DAEYhuYabFaaaii1I1vlni3YhrgmmiePTEnwMfsSAIyzLoa/TYROH 0G7xmYOswAHLDjYYpNWV0BQ8y/7wdMzi0yWwX+ri99hfSclAL7wpcwgVA6mfuFsaiBq1 Qh2d4NJz08t+CuznawxEQQiy8hEpB+CnovW0rx4Yj8IDwHH5jlIt4kVc90UETT0mREFG Os5mSvcdkFhX1uD94V9YavozPM2RhUUYeXQeUpeDa1rOpKlTWEJ4FK7UtLaXb011kPpx 5k88tueHiFfrHfRwxn/qk+ZkGokf5UegeOIJXVLJc8hAeyFtga/Ws9QsMNGh5vzu9F9Z rEzQ== 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=T70YgG6iNj1d/J4Ai7tYgjuw7hr5Kn/O9vaUxGnKaws=; b=rFNk90DJZA3Y6C72NvVU6hRRLux4WIKXeibr6BeX6DFocYGgVJ12nale0BzxSJBGrI 45v/LFdvOQe77WrJ2YDO5hb2fM/AF2s7Om5Oga93avn0aTBE9A96RHIFZArnruzoKQNt 5PJY4lx/IdqD2f1w1sVUrZhfd0XT3uuQnPK3i9Mx7cRv8xZoU9x/bqHc9qLRxeED6GKr bZjSQ+8nIhXO11QHupGGbSA3ZOv0OpoeP78i5oVNTuMiwv8Y9PTZfyyQmxAjbVNXH5M3 JrIwB2B5IHvqhzVTK3c53agg39yhiSMIMR6rNqdatcYL8aKXl/JiCsAdTA2VnPExUHS7 hnRw== 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=uQMR+WJR; 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 q23-v6si2119309pfh.353.2018.09.25.06.44.20; Tue, 25 Sep 2018 06:44:20 -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=uQMR+WJR; 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 3A70B794F5; Tue, 25 Sep 2018 13:44:15 +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 5DFE6793F3 for ; Tue, 25 Sep 2018 13:43:55 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id z3-v6so11597656wrr.13 for ; Tue, 25 Sep 2018 06:43:56 -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=HhvBxcGua8YhMBOocBbKZcQfPn1NXl6QMZFnxLSxJcQ=; b=uQMR+WJR9q6CHXCuTzAt54kB64yuJH0QG7hhzsbyDBrU5IH24cbdnsNiD6E7JyEM/9 xaMZYeHgDKF3fSDx7cQWYN8POKDcHyTFU9kSBmgzCBC2OA3aVfw04gno1kimLR+u3XAy iqeItTxkhWPX3XcoixUyqj+H3H1QXbj4vG/dUBVJRk9S/HUIk5XwRCWRLPeTe/ix/4/L oI6TAbdz+53SV1/xEF6yqnno9W5bFPokzwdBeL02uD7p/F9C5SzNDnv+sD9GB1bxlZPl kp2ycqruBAyO37mmrmHiX4PJh0wO22tW386BA2GU1tfWyugW4IbcMjVoFw/H3js79pqB YGrQ== 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=HhvBxcGua8YhMBOocBbKZcQfPn1NXl6QMZFnxLSxJcQ=; b=VxuZ4ziFzqJ5ACbvpAN4oB1k9qpJNEjh9kmgoxlG3dt+VUi7nHnmE/nOlTdVeIu4v6 wDDHUOyN0x4V3R4AMuz2Ues8I3nOQgpdp6g7vFAoe3JMYXo2vEb4Xyq2KJ3qcXZpNG5n o3xfZUPN5T9tKpRr4qvQLUK48PKGoHrbpL9WpdPI7OjPVkMBa63qKGX/ozy7JC12Jdzv VP4JgaMvxDqCW30g9whZIot9B6x1/CzUMBD5av6bm0ausFdY+edaqLzuY/16sFi0B9hJ 4q199iwjc+2qPRWAZnL83L7+RNcmgxF6XZGAJCvDuJb08Nucd5Kp+JjWVO6k9H/fshd8 cR5w== X-Gm-Message-State: ABuFfohg99CbHnBSB/WHGCnkke0b1QfHGzH/IMSBcehMJsD5aius2Dnr VWpRXHtLmiZBeVingL/R0hXG7jC36Uk= X-Received: by 2002:adf:e792:: with SMTP id n18-v6mr1127667wrm.136.1537883035795; Tue, 25 Sep 2018 06:43:55 -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 b21-v6sm1852340wmj.28.2018.09.25.06.43.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 06:43:55 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Tue, 25 Sep 2018 14:43:45 +0100 Message-Id: <20180925134348.5562-3-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180925134348.5562-1-ross.burton@intel.com> References: <20180925134348.5562-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 3/6] meson: pass correct endian in the cross file 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 Meson doesn't care for the value of the endian field, but packages may want to use it and Meson master now validates the value. Use siteinfo to obtain the endianism and write the correct value. Signed-off-by: Ross Burton --- meta/classes/meson.bbclass | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) -- 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/meson.bbclass b/meta/classes/meson.bbclass index e3b452786d8..07322cf7865 100644 --- a/meta/classes/meson.bbclass +++ b/meta/classes/meson.bbclass @@ -1,4 +1,4 @@ -inherit python3native +inherit siteinfo python3native DEPENDS_append = " meson-native ninja-native" @@ -31,10 +31,6 @@ MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CFLAGS}" MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CXXFLAGS}" MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${LDFLAGS}" -# both are required but not used by meson -MESON_HOST_ENDIAN = "bogus-endian" -MESON_TARGET_ENDIAN = "bogus-endian" - EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}" MESON_CROSS_FILE = "" @@ -59,6 +55,16 @@ def meson_cpu_family(var, d): else: return arch +def meson_endian(prefix, d): + arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS") + sitedata = siteinfo_data_for_machine(arch, os, d) + if "endian-little" in sitedata: + return "little" + elif "endian-big" in sitedata: + return "big" + else: + bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) + addtask write_config before do_configure do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF" do_write_config() { @@ -86,13 +92,13 @@ gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper' system = '${HOST_OS}' cpu_family = '${@meson_cpu_family('HOST_ARCH', d)}' cpu = '${HOST_ARCH}' -endian = '${MESON_HOST_ENDIAN}' +endian = '${@meson_endian('HOST', d)}' [target_machine] system = '${TARGET_OS}' cpu_family = '${@meson_cpu_family('TARGET_ARCH', d)}' cpu = '${TARGET_ARCH}' -endian = '${MESON_TARGET_ENDIAN}' +endian = '${@meson_endian('TARGET', d)}' EOF }