From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] build:arm: Remove setting of CROSS_COMPILE environment variable
Date: Tue, 25 Mar 2014 09:55:45 +0100 [thread overview]
Message-ID: <20140325095545.5220d6a2@amdc2363> (raw)
In-Reply-To: <20140319115535.7A59.AA925319@jp.panasonic.com>
Hi Albert,
> Hi Lukasz, Tom,
>
>
> > Hi Tom,
> >
> > > On Tue, Mar 18, 2014 at 04:46:48PM +0100, Lukasz Majewski wrote:
> > >
> > > > After Kbuild introduction, the CROSS_COMPILE environment
> > > > variable has been set to some default value (prefix arm-linux-).
> > >
> > > Note that this is quite a long-standing thing. Perhaps we're now
> > > not detecting a native build when we used to?
> >
> > My point is that we are relying on assigning default prefix (i.e.
> > arm-linux-)
> >
> > For example OSELAS toolchains can have an arbitrary prefix
> > (e.g. arm-linux-gnueabi-).
> >
> > When I cross compile I set explicitly "CROSS_COMPILE=<toolchain>
> > make" and it works as it should (with or without this patch). Such
> > approach seems natural for me.
> >
> > However, I don't know what is the exact rationale for seting this
> > arm-linux- prefix to CROSS_COMPILE.
> > I can only guess, that it is connected with situation when one just
> > type "make" on x86_64 host and expect u-boot to be CROSS_COMPILE'd
> > out of the box.
>
> Agree.
> It is useful only for people using "arm-linux-gcc" on x86 host.
> I usually use "arm-linux-gnueabi-gcc". Someone else may be using other
> prefixes.
>
> I think there is no rationale more sophisticated than that it just has
> been there since long time before.
>
> So, I agree with this patch except a little misleading
> commit description I commented below.
>
> Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>
Albert, could you take this patch for your arm repository?
>
>
> > Unfortunately this doesn't work with ARM host emulated with qemu
> > (like OBS). Here when I type "make" I expect that "native" gcc for
> > arm will run without even touching CROSS_COMPILE environment
> > variable.
>
> I believe it is the same as prior to Kbuild.
>
> So, I am not convined with this part of your commit description:
> > After Kbuild introduction, the CROSS_COMPILE environment variable
> > has been set to some default value (prefix arm-linux-).
>
>
> > Any idea how to fix this is more than welcome.
>
> If you are searching some other choices,
>
>
> [1]
> ifneq ("$(origin CROSS_COMPILE)", "command line")
> ifeq ($(CROSS_COMPILE),)
> CROSS_COMPILE := arm-linux-
> endif
> endif
>
> For native build on ARM, you can explicitely set CROSS_COMPILE as
> empty: "make CROSS_COMPILE="
> In this case, CROSS_COMPILE will not be overwritten in
> arch/arm/config.mk.
>
>
> [2]
> ifneq ($(HOSTARCH),$(ARCH))
> ifeq ($(CROSS_COMPILE),)
> CROSS_COMPILE := arm-linux-
> endif
> endif
>
> For native build on ARM, both $(HOSTARCH) and $(ARCH)
> are "arm", so CROSS_COMPILE will not be set.
>
>
>
> But, I think deleting CROSS_COMPILE setting is the simplest and the
> best.
>
>
> Best Regards
> Masahiro Yamada
>
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2014-03-25 8:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 15:46 [U-Boot] [PATCH] build:arm: Remove setting of CROSS_COMPILE environment variable Lukasz Majewski
2014-03-18 16:22 ` Tom Rini
2014-03-18 22:09 ` Lukasz Majewski
2014-03-19 2:55 ` Masahiro Yamada
2014-03-19 7:04 ` Lukasz Majewski
2014-03-25 8:55 ` Lukasz Majewski [this message]
2014-03-25 10:00 ` Albert ARIBAUD
2014-03-25 10:26 ` Lukasz Majewski
2014-03-31 7:28 ` Lukasz Majewski
2014-04-07 7:04 ` Lukasz Majewski
2014-04-07 18:04 ` Albert ARIBAUD
2014-04-07 18:05 ` Albert ARIBAUD
2014-04-09 2:09 ` 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=20140325095545.5220d6a2@amdc2363 \
--to=l.majewski@samsung.com \
--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