All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] rust: make sure the cxx compiler is also set for the target
Date: Mon, 2 Apr 2018 00:48:57 +0200	[thread overview]
Message-ID: <20180402004857.7e7e46c1@windsurf> (raw)
In-Reply-To: <20180228173852.66069-1-charles.hardin@storagecraft.com>

Hello Charles,

Eric: could you review the patch below ?

On Wed, 28 Feb 2018 09:38:52 -0800, charles.hardin at storagecraft.com
wrote:
> From: Charles Hardin <charles.hardin@storagecraft.com>
> 
> 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.

I am sorry, but I don't understand this sentence. Could you explain in
more details what is going on ?

> 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; \

This is doing two things:

 1. Defining cxx, like the commit title says

 2. Only defining cc and cxx when RUSTC_HOST_NAME and
    RUSTC_TARGET_NAME, which is not explained anywhere.

Could you clarify what this patch does, and why it is needed, with a
better commit log ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-04-01 22:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 17:38 [Buildroot] [PATCH 1/1] rust: make sure the cxx compiler is also set for the target charles.hardin at storagecraft.com
2018-04-01 22:48 ` Thomas Petazzoni [this message]
2018-04-01 22:52   ` Charles Hardin
2018-04-01 22:57     ` Thomas Petazzoni
2018-04-01 23:00       ` Charles Hardin
2018-04-01 23:05         ` Charles Hardin
2018-04-02  6:38           ` Thomas Petazzoni
2018-04-02 19:54             ` Charles Hardin
2018-04-03 22:01               ` Eric Le Bihan
2018-04-03 22:11                 ` Charles Hardin
2018-12-16 13:41                 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180402004857.7e7e46c1@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.