* [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
@ 2006-05-04 19:35 Tim Bird
2006-05-04 20:55 ` Thiemo Seufer
0 siblings, 1 reply; 18+ messages in thread
From: Tim Bird @ 2006-05-04 19:35 UTC (permalink / raw)
To: linux-mips
The following patch allows to build using CROSS_COMPILE from the environment.
I have an automated system which works like this, but it chokes on MIPS when
I use it with (albeit non-standard-named) cross-compiler tools. An easy
workaround I'm using is to put CROSS_COMPILE on the make command line, but it would
be nice to use the definition already in the environment when I work
manually in the system.
For past discussion of this see:
http://www.linux-mips.org/archives/linux-mips/2003-02/msg00196.html
I'm not sure why the change didn't make it in back in 2003, but
if the complaint was about the use of "?=", that seems to be in use
other places, and fairly standard now.
For example, from the top level kernel Makefile:
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
Signed-off-by: Tim Bird <tim.bird@am.sony.com>
---
--- alp-linux.orig/arch/mips/Makefile 2006-05-04 12:22:17.000000000 -0700
+++ alp-linux/arch/mips/Makefile 2006-05-04 12:10:22.000000000 -0700
@@ -49,7 +49,7 @@ UTS_MACHINE := mips64
endif
ifdef CONFIG_CROSSCOMPILE
-CROSS_COMPILE = $(tool-prefix)
+CROSS_COMPILE ?= $(tool-prefix)
endif
CHECKFLAGS-y += -D__linux__ -D__mips__ \
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 19:35 [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var Tim Bird
@ 2006-05-04 20:55 ` Thiemo Seufer
2006-05-04 21:04 ` Tom Rini
2006-05-04 21:17 ` [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var Tim Bird
0 siblings, 2 replies; 18+ messages in thread
From: Thiemo Seufer @ 2006-05-04 20:55 UTC (permalink / raw)
To: Tim Bird; +Cc: linux-mips
Tim Bird wrote:
> The following patch allows to build using CROSS_COMPILE from the environment.
> I have an automated system which works like this, but it chokes on MIPS when
> I use it with (albeit non-standard-named) cross-compiler tools. An easy
> workaround I'm using is to put CROSS_COMPILE on the make command line, but it would
> be nice to use the definition already in the environment when I work
> manually in the system.
>
> For past discussion of this see:
> http://www.linux-mips.org/archives/linux-mips/2003-02/msg00196.html
>
> I'm not sure why the change didn't make it in back in 2003, but
> if the complaint was about the use of "?=", that seems to be in use
> other places, and fairly standard now.
>
> For example, from the top level kernel Makefile:
> ARCH ?= $(SUBARCH)
> CROSS_COMPILE ?=
It looks like the other arch-specific Makefiles also override the
environment. To work around the problem, you can disable
CONFIG_CROSSCOMPILE and define CROSS_COMPILE in the environment.
Strangely enough, the help for CONFIG_CROSSCOMPILE already explains
that.
Thiemo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 20:55 ` Thiemo Seufer
@ 2006-05-04 21:04 ` Tom Rini
2006-05-04 21:25 ` Kevin D. Kissell
2006-05-04 23:06 ` Ralf Baechle
2006-05-04 21:17 ` [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var Tim Bird
1 sibling, 2 replies; 18+ messages in thread
From: Tom Rini @ 2006-05-04 21:04 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: Tim Bird, linux-mips
On Thu, May 04, 2006 at 09:55:17PM +0100, Thiemo Seufer wrote:
> Tim Bird wrote:
> > The following patch allows to build using CROSS_COMPILE from the environment.
> > I have an automated system which works like this, but it chokes on MIPS when
> > I use it with (albeit non-standard-named) cross-compiler tools. An easy
> > workaround I'm using is to put CROSS_COMPILE on the make command line, but it would
> > be nice to use the definition already in the environment when I work
> > manually in the system.
> >
> > For past discussion of this see:
> > http://www.linux-mips.org/archives/linux-mips/2003-02/msg00196.html
> >
> > I'm not sure why the change didn't make it in back in 2003, but
> > if the complaint was about the use of "?=", that seems to be in use
> > other places, and fairly standard now.
> >
> > For example, from the top level kernel Makefile:
> > ARCH ?= $(SUBARCH)
> > CROSS_COMPILE ?=
>
> It looks like the other arch-specific Makefiles also override the
> environment. To work around the problem, you can disable
> CONFIG_CROSSCOMPILE and define CROSS_COMPILE in the environment.
>
> Strangely enough, the help for CONFIG_CROSSCOMPILE already explains
> that.
Let me ask a stupid question. With all of the ways to otherwise do a
cross compile, why a config option on MIPS? ARM*/SH*, which are at
least as likely to not be native-compiled, don't do that. Just
something I've always wondered, really.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 20:55 ` Thiemo Seufer
2006-05-04 21:04 ` Tom Rini
@ 2006-05-04 21:17 ` Tim Bird
2006-05-04 22:35 ` Thiemo Seufer
1 sibling, 1 reply; 18+ messages in thread
From: Tim Bird @ 2006-05-04 21:17 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: linux-mips
Thiemo Seufer wrote:
> It looks like the other arch-specific Makefiles also override the
> environment.
4 other arches I work with don't.
> To work around the problem, you can disable
> CONFIG_CROSSCOMPILE and define CROSS_COMPILE in the environment.
I thought that might be the case, but that's pretty broken IMHO.
It's counterintuitive and undocumented.
>
> Strangely enough, the help for CONFIG_CROSSCOMPILE already explains
> that.
Here's the help from my Kconfig.debug:
Say Y here if you are compiling the kernel on a different
architecture than the one it is intended to run on.
Am I missing something?
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
@ 2006-05-04 21:25 ` Kevin D. Kissell
0 siblings, 0 replies; 18+ messages in thread
From: Kevin D. Kissell @ 2006-05-04 21:25 UTC (permalink / raw)
To: Tom Rini, Thiemo Seufer; +Cc: Tim Bird, linux-mips
> Let me ask a stupid question. With all of the ways to otherwise do a
> cross compile, why a config option on MIPS? ARM*/SH*, which are at
> least as likely to not be native-compiled, don't do that. Just
> something I've always wondered, really.
Probably because, unlike ARM and SH, the MIPS architecture began life
as a workstation/server processor, and for a while there cross-compilation
was the exception rather than the rule.
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
@ 2006-05-04 21:25 ` Kevin D. Kissell
0 siblings, 0 replies; 18+ messages in thread
From: Kevin D. Kissell @ 2006-05-04 21:25 UTC (permalink / raw)
To: Tom Rini, Thiemo Seufer; +Cc: Tim Bird, linux-mips
> Let me ask a stupid question. With all of the ways to otherwise do a
> cross compile, why a config option on MIPS? ARM*/SH*, which are at
> least as likely to not be native-compiled, don't do that. Just
> something I've always wondered, really.
Probably because, unlike ARM and SH, the MIPS architecture began life
as a workstation/server processor, and for a while there cross-compilation
was the exception rather than the rule.
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
@ 2006-05-04 21:32 ` Kevin D. Kissell
0 siblings, 0 replies; 18+ messages in thread
From: Kevin D. Kissell @ 2006-05-04 21:32 UTC (permalink / raw)
To: Kevin D. Kissell, Tom Rini, Thiemo Seufer; +Cc: Tim Bird, linux-mips
> > Let me ask a stupid question. With all of the ways to otherwise do a
> > cross compile, why a config option on MIPS? ARM*/SH*, which are at
> > least as likely to not be native-compiled, don't do that. Just
> > something I've always wondered, really.
>
> Probably because, unlike ARM and SH, the MIPS architecture began life
> as a workstation/server processor, and for a while there cross-compilation
> was the exception rather than the rule.
Before anyone else jumps in, yeah, ARM was sort-of a workstation processor
to begin with, too, but I don't think the original Acorn RISC Machine was set
up to run a "real" OS, with memory management, etc., whereas MIPS was.
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
@ 2006-05-04 21:32 ` Kevin D. Kissell
0 siblings, 0 replies; 18+ messages in thread
From: Kevin D. Kissell @ 2006-05-04 21:32 UTC (permalink / raw)
To: Kevin D. Kissell, Tom Rini, Thiemo Seufer; +Cc: Tim Bird, linux-mips
> > Let me ask a stupid question. With all of the ways to otherwise do a
> > cross compile, why a config option on MIPS? ARM*/SH*, which are at
> > least as likely to not be native-compiled, don't do that. Just
> > something I've always wondered, really.
>
> Probably because, unlike ARM and SH, the MIPS architecture began life
> as a workstation/server processor, and for a while there cross-compilation
> was the exception rather than the rule.
Before anyone else jumps in, yeah, ARM was sort-of a workstation processor
to begin with, too, but I don't think the original Acorn RISC Machine was set
up to run a "real" OS, with memory management, etc., whereas MIPS was.
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 21:25 ` Kevin D. Kissell
(?)
(?)
@ 2006-05-04 21:44 ` Tom Rini
-1 siblings, 0 replies; 18+ messages in thread
From: Tom Rini @ 2006-05-04 21:44 UTC (permalink / raw)
To: Kevin D. Kissell; +Cc: Thiemo Seufer, Tim Bird, linux-mips
On Thu, May 04, 2006 at 11:25:46PM +0200, Kevin D. Kissell wrote:
> > Let me ask a stupid question. With all of the ways to otherwise do a
> > cross compile, why a config option on MIPS? ARM*/SH*, which are at
> > least as likely to not be native-compiled, don't do that. Just
> > something I've always wondered, really.
>
> Probably because, unlike ARM and SH, the MIPS architecture began life
> as a workstation/server processor, and for a while there cross-compilation
> was the exception rather than the rule.
OK, PowerPC. My kinda question/point was perhaps it's time to deprecate
CONFIG_CROSSCOMPILE in favor of env or make to bring it in line with
other arches (similar to how 2.4 had a few ways for
arch/$(ARCH)/*config/ dirs, 2.6 is uniform).
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 21:17 ` [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var Tim Bird
@ 2006-05-04 22:35 ` Thiemo Seufer
2006-05-08 18:22 ` Tim Bird
0 siblings, 1 reply; 18+ messages in thread
From: Thiemo Seufer @ 2006-05-04 22:35 UTC (permalink / raw)
To: Tim Bird; +Cc: linux-mips
Tim Bird wrote:
> Thiemo Seufer wrote:
> > It looks like the other arch-specific Makefiles also override the
> > environment.
>
> 4 other arches I work with don't.
>
> > To work around the problem, you can disable
> > CONFIG_CROSSCOMPILE and define CROSS_COMPILE in the environment.
>
> I thought that might be the case, but that's pretty broken IMHO.
> It's counterintuitive and undocumented.
>
> >
> > Strangely enough, the help for CONFIG_CROSSCOMPILE already explains
> > that.
>
> Here's the help from my Kconfig.debug:
>
> Say Y here if you are compiling the kernel on a different
> architecture than the one it is intended to run on.
>
> Am I missing something?
Update to a newer version:
config CROSSCOMPILE
bool "Are you using a crosscompiler"
help
Say Y here if you are compiling the kernel on a different
architecture than the one it is intended to run on. This is just a
convenience option which will select the appropriate value for
the CROSS_COMPILE make variable which otherwise has to be passed on
the command line from mips-linux-, mipsel-linux-, mips64-linux- and
mips64el-linux- as appropriate for a particular kernel configuration.
You will have to pass the value for CROSS_COMPILE manually if the
name prefix for your tools is different.
Thiemo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 21:04 ` Tom Rini
2006-05-04 21:25 ` Kevin D. Kissell
@ 2006-05-04 23:06 ` Ralf Baechle
2006-05-04 23:14 ` Tom Rini
2006-05-08 18:35 ` [PATCH] fix mips/Makefile to support CROSS_COMPILE from envir onment var Tim Bird
1 sibling, 2 replies; 18+ messages in thread
From: Ralf Baechle @ 2006-05-04 23:06 UTC (permalink / raw)
To: Tom Rini; +Cc: Thiemo Seufer, Tim Bird, linux-mips
On Thu, May 04, 2006 at 02:04:49PM -0700, Tom Rini wrote:
> Let me ask a stupid question. With all of the ways to otherwise do a
> cross compile, why a config option on MIPS? ARM*/SH*, which are at
> least as likely to not be native-compiled, don't do that. Just
> something I've always wondered, really.
Having such information in an environment variable is imho terribly
inelegant, having to pass it on the command line for each make invocation
is terrible abuse for the fingertips so I went for this option which makes
the makefile pick the right prefix.
Ralf
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 23:06 ` Ralf Baechle
@ 2006-05-04 23:14 ` Tom Rini
2006-05-04 23:34 ` Tom Rini
2006-05-08 18:35 ` [PATCH] fix mips/Makefile to support CROSS_COMPILE from envir onment var Tim Bird
1 sibling, 1 reply; 18+ messages in thread
From: Tom Rini @ 2006-05-04 23:14 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Thiemo Seufer, Tim Bird, linux-mips
On Fri, May 05, 2006 at 12:06:47AM +0100, Ralf Baechle wrote:
> On Thu, May 04, 2006 at 02:04:49PM -0700, Tom Rini wrote:
>
> > Let me ask a stupid question. With all of the ways to otherwise do a
> > cross compile, why a config option on MIPS? ARM*/SH*, which are at
> > least as likely to not be native-compiled, don't do that. Just
> > something I've always wondered, really.
>
> Having such information in an environment variable is imho terribly
> inelegant, having to pass it on the command line for each make invocation
> is terrible abuse for the fingertips so I went for this option which makes
> the makefile pick the right prefix.
I don't suppose you'd be willing to front pushing that to the rest of
the world then, would you? Inconsistency is more of a problem for me
than changing any of my scripts to use something else :)
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 23:14 ` Tom Rini
@ 2006-05-04 23:34 ` Tom Rini
2006-05-05 7:45 ` Geert Uytterhoeven
0 siblings, 1 reply; 18+ messages in thread
From: Tom Rini @ 2006-05-04 23:34 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Thiemo Seufer, Tim Bird, linux-mips
On Thu, May 04, 2006 at 04:14:32PM -0700, Tom Rini wrote:
> On Fri, May 05, 2006 at 12:06:47AM +0100, Ralf Baechle wrote:
> > On Thu, May 04, 2006 at 02:04:49PM -0700, Tom Rini wrote:
> >
> > > Let me ask a stupid question. With all of the ways to otherwise do a
> > > cross compile, why a config option on MIPS? ARM*/SH*, which are at
> > > least as likely to not be native-compiled, don't do that. Just
> > > something I've always wondered, really.
> >
> > Having such information in an environment variable is imho terribly
> > inelegant, having to pass it on the command line for each make invocation
> > is terrible abuse for the fingertips so I went for this option which makes
> > the makefile pick the right prefix.
>
> I don't suppose you'd be willing to front pushing that to the rest of
> the world then, would you? Inconsistency is more of a problem for me
> than changing any of my scripts to use something else :)
... I forgot this doesn't take a string value of what to use but
hard-coded options.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 23:34 ` Tom Rini
@ 2006-05-05 7:45 ` Geert Uytterhoeven
2006-05-05 18:45 ` Wolfgang Denk
0 siblings, 1 reply; 18+ messages in thread
From: Geert Uytterhoeven @ 2006-05-05 7:45 UTC (permalink / raw)
To: Tom Rini; +Cc: Ralf Baechle, Thiemo Seufer, Tim Bird, Linux/MIPS Development
On Thu, 4 May 2006, Tom Rini wrote:
> On Thu, May 04, 2006 at 04:14:32PM -0700, Tom Rini wrote:
> > On Fri, May 05, 2006 at 12:06:47AM +0100, Ralf Baechle wrote:
> > > On Thu, May 04, 2006 at 02:04:49PM -0700, Tom Rini wrote:
> > >
> > > > Let me ask a stupid question. With all of the ways to otherwise do a
> > > > cross compile, why a config option on MIPS? ARM*/SH*, which are at
> > > > least as likely to not be native-compiled, don't do that. Just
> > > > something I've always wondered, really.
> > >
> > > Having such information in an environment variable is imho terribly
> > > inelegant, having to pass it on the command line for each make invocation
> > > is terrible abuse for the fingertips so I went for this option which makes
You can make it so that you can use both, right? This is what the suggested
patch does. No CROSS_COMPILE in env or on the make command line means a native
compilation.
> > > the makefile pick the right prefix.
> >
> > I don't suppose you'd be willing to front pushing that to the rest of
> > the world then, would you? Inconsistency is more of a problem for me
> > than changing any of my scripts to use something else :)
>
> ... I forgot this doesn't take a string value of what to use but
> hard-coded options.
So let it take a string option, and make it generic.
But on second thought: config options are part of the target configuration,
while CROSS_COMPILE= is part of the host configuration, so IMHO it doesn't
belong in Kconfig. I.e. do you want to have CONFIG_CROSS_COMPILE set in your
defconfig? Yes or no, depending on whether you do cross-compilations or not. So
you cannot simply take a defconfig, you'll have to modify it for your host
setup.
So I'd prefer to keep the CROSS_COMPILE, like other arches do.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-05 7:45 ` Geert Uytterhoeven
@ 2006-05-05 18:45 ` Wolfgang Denk
0 siblings, 0 replies; 18+ messages in thread
From: Wolfgang Denk @ 2006-05-05 18:45 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Tom Rini, Ralf Baechle, Thiemo Seufer, Tim Bird,
Linux/MIPS Development
In message <Pine.LNX.4.62.0605050940410.649@pademelon.sonytel.be> you wrote:
>
> But on second thought: config options are part of the target configuration,
> while CROSS_COMPILE= is part of the host configuration, so IMHO it doesn't
> belong in Kconfig. I.e. do you want to have CONFIG_CROSS_COMPILE set in your
> defconfig? Yes or no, depending on whether you do cross-compilations or not. So
> you cannot simply take a defconfig, you'll have to modify it for your host
> setup.
CONFIG_CROSS_COMPILE is a terrible idea. Don't do it. We may want to
try different tool chains which require different CROSS_COMPILE
settings with exact the same default config file. Don't break this!
> So I'd prefer to keep the CROSS_COMPILE, like other arches do.
Me too!
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
If A equals success, then the formula is A = X + Y + Z. X is work. Y
is play. Z is keep your mouth shut. - Albert Einstein
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var
2006-05-04 22:35 ` Thiemo Seufer
@ 2006-05-08 18:22 ` Tim Bird
0 siblings, 0 replies; 18+ messages in thread
From: Tim Bird @ 2006-05-08 18:22 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: linux-mips
Thiemo Seufer wrote:
> Update to a newer version:
Of what? I'm using a 2.6.16 kernel here.
> config CROSSCOMPILE
> bool "Are you using a crosscompiler"
> help
> Say Y here if you are compiling the kernel on a different
> architecture than the one it is intended to run on. This is just a
> convenience option which will select the appropriate value for
> the CROSS_COMPILE make variable which otherwise has to be passed on
> the command line from mips-linux-, mipsel-linux-, mips64-linux- and
> mips64el-linux- as appropriate for a particular kernel configuration.
> You will have to pass the value for CROSS_COMPILE manually if the
> name prefix for your tools is different.
Hmmm. Well, I would say that this should be pushed to mainline,
but I still think it could be improved a bit.
IMHO, the config question should be something like:
"Use cross-compiler defined by Makefile", instead of "Are you
using a crosscompiler".
My recommendation would be to apply my patch and drop the
last sentence. Then you get the best of all worlds:
- support for command line specification, if you use it
- support for env. var specification, if you use it.
- automatic prefix selection if you use this option
=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from envir onment var
2006-05-04 23:06 ` Ralf Baechle
2006-05-04 23:14 ` Tom Rini
@ 2006-05-08 18:35 ` Tim Bird
2006-05-08 18:56 ` Dan Malek
1 sibling, 1 reply; 18+ messages in thread
From: Tim Bird @ 2006-05-08 18:35 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Tom Rini, Thiemo Seufer, Bird, Tim, linux-mips
Ralf Baechle wrote:
> On Thu, May 04, 2006 at 02:04:49PM -0700, Tom Rini wrote:
>
>> Let me ask a stupid question. With all of the ways to otherwise do a
>> cross compile, why a config option on MIPS? ARM*/SH*, which are at
>> least as likely to not be native-compiled, don't do that. Just
>> something I've always wondered, really.
>
> Having such information in an environment variable is imho terribly
> inelegant, having to pass it on the command line for each make
> invocation
> is terrible abuse for the fingertips so I went for this option which
> makes
> the makefile pick the right prefix.
And a great solution it would be, if it actually picked the
right prefix. :-) I understand that having the cross-compiler prefix
specified outside the build system has drawbacks. When I first got
into embedded Linux (many years ago), I was struck by the inelegance
of this also. However, hardcoding the prefixes in the Makefile is, IMHO,
not such a great idea either.
It really doesn't bother me if the "standard" prefixes are encoded in
a Makefile, but it would be nice to be able to select a non-standard
prefix the same way as for other Linux architectures.
I understand I can do that by turning off the "I'm cross-compiling"
option, but that seems counterintuitive given the current wording
of that option (not-withstanding the not-yet-mainlined help text).
My patch allows to keep the current behaviour, but also supports
use of the environment variable. I don't see any downside to it,
unless you are actively trying to discourage the use of the
environment variable. In my own experience, use of the environment
variable, while inelegant for manual use, has certain benefits
for automated use.
Regards,
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] fix mips/Makefile to support CROSS_COMPILE from envir onment var
2006-05-08 18:35 ` [PATCH] fix mips/Makefile to support CROSS_COMPILE from envir onment var Tim Bird
@ 2006-05-08 18:56 ` Dan Malek
0 siblings, 0 replies; 18+ messages in thread
From: Dan Malek @ 2006-05-08 18:56 UTC (permalink / raw)
To: Tim Bird; +Cc: Ralf Baechle, Tom Rini, Thiemo Seufer, linux-mips
On May 8, 2006, at 2:35 PM, Tim Bird wrote:
> ..... I understand that having the cross-compiler prefix
> specified outside the build system has drawbacks. When I first got
> into embedded Linux (many years ago), I was struck by the inelegance
> of this also.
The only drawback is you have to type it in correctly :-)
This "inelegance" of having to set an environment variable has
proven extremely useful in many of my experiences with
clients building real products. They have installed many different
cross compilers, and often use build procedures to meet
various configuration management requirements. The
need to explicitly select a complier is absolutely necessary,
you can't have a Makefile guessing.
I personally like setting the environment option, and wish
MIPS would just drop this whole cross compile selection
from the configuration process and work like all of the
other architectures.
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2006-05-08 18:57 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-04 19:35 [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var Tim Bird
2006-05-04 20:55 ` Thiemo Seufer
2006-05-04 21:04 ` Tom Rini
2006-05-04 21:25 ` Kevin D. Kissell
2006-05-04 21:25 ` Kevin D. Kissell
2006-05-04 21:32 ` Kevin D. Kissell
2006-05-04 21:32 ` Kevin D. Kissell
2006-05-04 21:44 ` Tom Rini
2006-05-04 23:06 ` Ralf Baechle
2006-05-04 23:14 ` Tom Rini
2006-05-04 23:34 ` Tom Rini
2006-05-05 7:45 ` Geert Uytterhoeven
2006-05-05 18:45 ` Wolfgang Denk
2006-05-08 18:35 ` [PATCH] fix mips/Makefile to support CROSS_COMPILE from envir onment var Tim Bird
2006-05-08 18:56 ` Dan Malek
2006-05-04 21:17 ` [PATCH] fix mips/Makefile to support CROSS_COMPILE from environment var Tim Bird
2006-05-04 22:35 ` Thiemo Seufer
2006-05-08 18:22 ` Tim Bird
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.