From patchwork Wed Feb 28 17:38:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Hardin X-Patchwork-Id: 879238 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=none (p=none dis=none) header.from=storagecraft.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zs2yt1Nz2z9s2K for ; Thu, 1 Mar 2018 04:45:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9B26A88A0B; Wed, 28 Feb 2018 17:45:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oMhKOGUPxjX6; Wed, 28 Feb 2018 17:45:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id A5BF2889B7; Wed, 28 Feb 2018 17:45:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id CCDEA1C0259 for ; Wed, 28 Feb 2018 17:45:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C908D28005 for ; Wed, 28 Feb 2018 17:45:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u4nQjKxbZR+i for ; Wed, 28 Feb 2018 17:45:18 +0000 (UTC) X-Greylist: delayed 00:08:08 by SQLgrey-1.7.6 Received: from us-smtp-delivery-103.mimecast.com (us-smtp-delivery-103.mimecast.com [63.128.21.103]) by silver.osuosl.org (Postfix) with ESMTPS id 90B782728B for ; Wed, 28 Feb 2018 17:45:17 +0000 (UTC) Received: from STC-EXCH.stc.local (webmail.storagecraft.com [198.135.233.15]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-170-eioG48lKPSOCR1v2WyBUSg-1; Wed, 28 Feb 2018 12:39:01 -0500 Received: from localhost.localdomain (50.1.97.2) by webmail.storagecraft.com (10.1.0.30) with Microsoft SMTP Server id 14.3.382.0; Wed, 28 Feb 2018 10:38:59 -0700 From: To: Date: Wed, 28 Feb 2018 09:38:52 -0800 Message-ID: <20180228173852.66069-1-charles.hardin@storagecraft.com> X-Mailer: git-send-email 2.14.3 (Apple Git-98) MIME-Version: 1.0 X-MC-Unique: eioG48lKPSOCR1v2WyBUSg-1 Subject: [Buildroot] [PATCH 1/1] rust: make sure the cxx compiler is also set for the target X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Le Bihan , Charles Hardin Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Charles Hardin Noticed that building the LLVM build -DCMAKE_CXX_COMPILER=c++ during the rust build which the C compiler was set to the expected buildroot compiler. So, update the toml file to also set the cxx variable. Signed-off-by: Charles Hardin --- package/rust/rust.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/rust/rust.mk b/package/rust/rust.mk index ff2634b996..9ea4c79af5 100644 --- a/package/rust/rust.mk +++ b/package/rust/rust.mk @@ -62,7 +62,10 @@ define HOST_RUST_CONFIGURE_CMDS echo '[rust]'; \ echo 'use-jemalloc = $(HOST_RUST_JEMALLOC_ENABLED)'; \ echo '[target.$(RUSTC_TARGET_NAME)]'; \ - echo 'cc = "$(TARGET_CROSS)gcc"'; \ + if [ "x$(RUSTC_HOST_NAME)" != "x$(RUSTC_TARGET_NAME)" ]; then \ + echo 'cc = "$(TARGET_CROSS)gcc"'; \ + echo 'cxx = "$(TARGET_CROSS)g++"'; \ + fi; \ echo $(HOST_RUST_JEMALLOC_CONF); \ ) > $(@D)/config.toml endef