From patchwork Fri Jun 2 15:55:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 101280 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp467371qge; Fri, 2 Jun 2017 08:56:32 -0700 (PDT) X-Received: by 10.84.212.2 with SMTP id d2mr627856pli.26.1496418992585; Fri, 02 Jun 2017 08:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496418992; cv=none; d=google.com; s=arc-20160816; b=cVlJ3izWdxtA1F89CWJD+R1oTxxDwrznQYmURYSepTZ0b/J6Rdp4SvPTiobSMW6/2X SHRRubGdvuF/Jno7c/PpT7VmNipxah59YYe6a3hofXc8gKAKGXVkO06VPRM31tXRf7y8 fF9pflZFQjpVhMiQo2oCS6U3AxG32cIubGWWMk0ovSHQJCjjLG/0PAUmFwvLisUtzxDM Ric8aS/vrwJEnJDAlL2I3CAL9I/VQ1BaXw+OH19HZUI0p0Y5je/Y8ffDQ/e1K/xycaS3 TBxMjHz0YOPjS1H2vgZ9FevsByfnAZgP8vO7AKzhtRt03FzuXJCkbWREHxKBg0+IF9I6 SQfA== 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=vK0EKaIuOaYgnhQy13Y6MGFNEvOGcz0cYyFyuX2aICs=; b=tZ9a4ZUXT77KabmjNpOO9xkgyetOE+hXn4YH/MuvmnNlvae8d0SIqB0Hf2Bl6U4Psl zjLFlAlmwP+tFOFwmFJhdhfZedwgpYMkJQ2DQYJ0M0qCfsyZUlbpWxbhXpTxx6hix6Sg mno9d5yXtLiuKpwbZBINaiinvVhYhYBjnxTxvfEpDfOgA6Sr263JG3MwcxKGY0YXlwLq SKylXSji3b9qZnoqdur8wgCGQ/STTf7iTU6AXS8WGA7A7ENlilFfr0JQN1GYixxhzpNr TcSO5oKl7X1T4O6/sCNd2DFm4EIU38OZq6nRD4rFVEKW2RlykOyxplKk6HN8QnjbP0FO Sisw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 31si101781plb.455.2017.06.02.08.56.31; Fri, 02 Jun 2017 08:56:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-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; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id AA7D577EA6; Fri, 2 Jun 2017 15:56:28 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by mail.openembedded.org (Postfix) with ESMTP id BD81F77EA5 for ; Fri, 2 Jun 2017 15:55:22 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id b84so29027892wmh.0 for ; Fri, 02 Jun 2017 08:55:24 -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=brj1qoJuUcrkwE6yyR6lkppkvdW/lS3rI5Hq0pcsyUc=; b=0vFRoCUXtZDeq21x96VCHl5S7nYfKIxF36OwbLOz3JJ32sCcvpLeexDjGZPoKjbHau CIddVUOao1cXkERQYzogL6KXWtnBTYA0mHc4ZZi5cwTZ4cIgqXp85WvUEpVWUV6UNk41 DWjmIf0eKH9Ycv4mbAtcH4o5hUSLJ8RaKhnrF0bKQq92Aoh95G4uXHubY1fkNNT95Lbe 7N4BhjU5WtLyz7OyTwtfvyaFc4KtjFFGk2059wwgCD1vz39FJ0z9ZDvfMCumgrz+Razt xlahS6XSofkgCzLHfqnTObElQlk27TZQMzXXll/7EDCjcNURXwNgRKBZcvkaSGdBW2EI 6RSQ== 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=brj1qoJuUcrkwE6yyR6lkppkvdW/lS3rI5Hq0pcsyUc=; b=j03VkszTWFWJuL2iT7GfhkKjVji6qYD0uQKuneXJGvYzqUISSV+beGZ3QD59nilpDZ W4dEyKE/W7LjTd93gPxifOmprw47Z0dSDKXrCXlq1jj/JsAi6zCV4Gi7M4143gG+Al/X Zm9dweNepaKKiqZekWH1bajcP8hJm3L6ZmkhNZrn1fXaVLpp74MCtix1tMbvm0Ww3o1l XJ6wJWdut//9uVj84BgugLA45Zw+8GGXNpayW9O8nY0EsiHACYhMBpAJiA1Nz20iDlXY cvMoWoKP3zkFvfIAe2XW4oe/wbRy+nCOv8xRje9XjDSY8mPqFijhHJOhuwSgVryKeQJd d90w== X-Gm-Message-State: AODbwcDP++C7/bdxObza7Y875W7g9O/gdrlkltk5vNiAYi7Mpkx7JkqW qJXgJ2v4V90PuoqDHyY= X-Received: by 10.28.71.147 with SMTP id m19mr4379wmi.92.1496418923219; Fri, 02 Jun 2017 08:55:23 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id m14sm2940059wmi.2.2017.06.02.08.55.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Jun 2017 08:55:22 -0700 (PDT) From: Ross Burton To: openembedded-devel@lists.openembedded.org Date: Fri, 2 Jun 2017 16:55:16 +0100 Message-Id: <1496418916-17305-2-git-send-email-ross.burton@intel.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1496418916-17305-1-git-send-email-ross.burton@intel.com> References: <1496418916-17305-1-git-send-email-ross.burton@intel.com> Subject: [oe] [PATCH 2/2] meson: set native tools X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org When cross-compiling meson respects the usual CC, CFLAGS and so on environment variables for *native* tools not *cross* tools, so instead of unexporting CC we should re-export the right tools. Not only is this the right thing to do, but recent changes to oe-core means that the default compiler binary (cc) isn't in PATH, so Meson can't build native binaries. Signed-off-by: Ross Burton --- meta-oe/classes/meson.bbclass | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.8.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/classes/meson.bbclass b/meta-oe/classes/meson.bbclass index 42f4005..0cf78e4 100644 --- a/meta-oe/classes/meson.bbclass +++ b/meta-oe/classes/meson.bbclass @@ -9,9 +9,13 @@ do_configure[cleandirs] = "${B}" # Where the meson.build build configuration is MESON_SOURCEPATH = "${S}" -# These variables in the environment override the *native* tools not the cross, -# so they need to be unexported. -CC[unexport] = "1" +# These variables in the environment override the *native* tools not the cross +CPPFLAGS = "${BUILD_CPPFLAGS}" +CC = "${BUILD_CC}" +CFLAGS = "${BUILD_CFLAGS}" +CXX = "${BUILD_CXX}" +CXXFLAGS = "${BUILD_CXXFLAGS}" +LDFLAGS = "${BUILD_LDFLAGS}" def noprefix(var, d): return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)