From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] kbuild: use "cc-cross-prefix" to choose CROSS_COMPILE
Date: Wed, 05 Mar 2014 11:38:46 +0100 [thread overview]
Message-ID: <m2y50pgcax.fsf@lamuella.denx.de> (raw)
In-Reply-To: <20140305192726.6E9E.AA925319@jp.panasonic.com> (Masahiro Yamada's message of "Wed, 05 Mar 2014 19:27:26 +0900")
Hi Masahiro,
> Hi Detlev,
>
>
> On Wed, 05 Mar 2014 11:06:03 +0100
> Detlev Zundel <dzu@denx.de> wrote:
>
>> Hi Masahiro,
>>
>> > CROSS_COMPILE is generally passed from the command line
>> > or by the environment variable because cross tools
>> > vary from user to user.
>> >
>> > But, having some choices of often used CROSS_COMPILE
>> > seems reasonable.
>> >
>> > $(call cc-cross-prefix, ...) returns the first prefix
>> > where a prefix$(CC) is found in PATH.
>> >
>> > If your cross tools exist in the argument of
>> > $(call cc-cross-prefix, ...), you do not have to
>> > specify it explicitly.
>> >
>> > Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>>
>> I have to admit that I don't really like this approach. On the one hand
>> it is an heuristic trying to guess the intentions of the user. This is
>> nice if it works but can be very surprising when it goes wrong.
>>
>> But more imprtantly, it will blur the the boundaries of the build
>> process as we trade the very self contained determinism of "use what
>> CROSS_COMPILE" says to "use what we may find in the rest of the system".
>>
>> It would even be possible that a "once working" build process will not
>> work anymore because the user has installed a new toolchain in the
>> meantime and then this completely unrelated action has an (unwanted)
>> impact.
>>
>> In short, I would rather want to stay with our current (clearly defined)
>> setup :)
>>
>
> Maybe this is verbose, but
> just in case, let me add a few words.
>
> If you like, you can still pass CROSS_COMPILE from the command line
> or by the environment variable.
>
>
> ifeq ($(CROSS_COMPILE),)
> CROSS_COMPILE := $(call cc-cross-prefix, arm-linux- arm-linux-gnueabi-)
> endif
>
> $(call cc-cross-prefix, ...) is invoked only when $(CROSS_COMPILE) is
> empty,
> that is CROSS_COMPILE is not explicitely specified.
>
>
> For users who know everything happening in the built system,
> this patch might be helpful for less typing...
Yes, I fully understand your intention but I still believe that setting
CROSS_COMPILE is usually scripted anyway so the savings are near
negligible and the "price" we pay is adding (more) information about
cross-toolchains which is really outside of the scope of U-Boot (or any
other project I'd say).
If there would be real savings, then maybe it is worth to break the
principle of modularity but in the current discussion I just don't see
that.
Best wishes
Detlev
--
Our choice isn't between a digital world where the NSA can eavesdrop and one
where the NSA is prevented from eavesdropping; it's between a digital world
that is vulnerable to allattackers, and one that is secure for all users.
-- Bruce Schneier
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
next prev parent reply other threads:[~2014-03-05 10:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-05 9:24 [U-Boot] [RFC PATCH] kbuild: use "cc-cross-prefix" to choose CROSS_COMPILE Masahiro Yamada
2014-03-05 10:06 ` Detlev Zundel
2014-03-05 10:27 ` Masahiro Yamada
2014-03-05 10:38 ` Detlev Zundel [this message]
2014-03-05 21:45 ` Gerhard Sittig
2014-03-05 13:37 ` Tom Rini
2014-03-12 5:47 ` Masahiro Yamada
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=m2y50pgcax.fsf@lamuella.denx.de \
--to=dzu@denx.de \
--cc=u-boot@lists.denx.de \
/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