From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Fix 'make toolchain-external-reinstall'
Date: Tue, 27 Sep 2016 18:52:06 +0200 [thread overview]
Message-ID: <20160927185206.5cce9234@free-electrons.com> (raw)
In-Reply-To: <1474993712-27904-1-git-send-email-jezz@sysmic.org>
Hello,
On Tue, 27 Sep 2016 18:28:32 +0200, J?r?me Pouiller wrote:
> diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
> index af39071..21690fd 100644
> --- a/toolchain/toolchain-wrapper.mk
> +++ b/toolchain/toolchain-wrapper.mk
> @@ -30,11 +30,15 @@ ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
> TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"'
> endif
>
> -# For simplicity, build directly into the install location
> -define TOOLCHAIN_BUILD_WRAPPER
> - $(Q)mkdir -p $(HOST_DIR)/usr/bin
> +define TOOLCHAIN_WRAPPER_BUILD
If you rename this, you should fix the gcc package, which also uses the
same variable. As it is, your patch breaks the internal toolchain
backend.
> $(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_WRAPPER_ARGS) \
> -s -Wl,--hash-style=$(TOOLCHAIN_WRAPPER_HASH_STYLE) \
> toolchain/toolchain-wrapper.c \
> - -o $(HOST_DIR)/usr/bin/toolchain-wrapper
> + -o toolchain/toolchain-wrapper
This is not good: it generates a file in the source tree. You should
consider the source tree as read-only. Anything built by Buildroot
should be generated in the output directory. So, I'd suggest to
generate it in $(@D)/toolchain-wrapper maybe?
> +define TOOLCHAIN_WRAPPER_INSTALL
> + $(Q)mkdir -p $(HOST_DIR)/usr/bin
Not needed, just use $(INSTALL) with the -D option.
Other than those implementation issues, I agree with the general
principle: the installation to the host directory should only take
place at install time.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
prev parent reply other threads:[~2016-09-27 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 16:28 [Buildroot] [PATCH] Fix 'make toolchain-external-reinstall' Jérôme Pouiller
2016-09-27 16:52 ` Thomas Petazzoni [this message]
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=20160927185206.5cce9234@free-electrons.com \
--to=thomas.petazzoni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox