I'm worried about tool chain problems, so I wanted to be able to build with a cross compiler. This patch adds that functionality to Kconfig.
This is most of the way there, but doesn't work when CONFIG_CROSS_COMPILE is set.
+ifeq ($(CONFIG_CROSS_COMPILE),y) +CC=$(CONFIG_CROSS_COMPILER) +CCSTRING="XCC" +endif
If I change it to
ifneq ($(CONFIG_CROSS_COMPILE),n) ... endif
It always uses the cross compiler.
Can someone spot what I did wrong, please?
xgcc_debug.diff just prints out the compiler information when you do make clean. It was a faster way for me to try things, but I still didn't find the correct way to do it.
Signed-off-by: Myles Watson mylesgw@gmail.com
Thanks, Myles
Myles Watson wrote:
I'm worried about tool chain problems, so I wanted to be able to build with a cross compiler. This patch adds that functionality to Kconfig.
That functionality is already there... see util/xcompile.
On Mon, Oct 26, 2009 at 12:56 PM, Stefan Reinauer stepan@coresystems.dewrote:
Myles Watson wrote:
I'm worried about tool chain problems, so I wanted to be able to build with a cross compiler. This patch adds that functionality to Kconfig.
That functionality is already there... see util/xcompile.
So what's the preferred way to invoke it?
I built the cross compiler in util/crossgcc, and wanted to set the CONFIG_CROSS_COMPILER variable in Kconfig. Should we just get rid of that and use:
make CC=util/crossgcc/xgcc/bin/i386-elf-gcc
or ?
Thanks, Myles
On Mon, Oct 26, 2009 at 1:05 PM, Myles Watson mylesgw@gmail.com wrote:
On Mon, Oct 26, 2009 at 12:56 PM, Stefan Reinauer stepan@coresystems.dewrote:
Myles Watson wrote:
I'm worried about tool chain problems, so I wanted to be able to build with a cross compiler. This patch adds that functionality to Kconfig.
That functionality is already there... see util/xcompile.
So what's the preferred way to invoke it?
I built the cross compiler in util/crossgcc, and wanted to set the CONFIG_CROSS_COMPILER variable in Kconfig. Should we just get rid of that and use:
make CC=util/crossgcc/xgcc/bin/i386-elf-gcc
Ping.
from targets/kontron/986lcd-m/Config-abuild.lb
option CC="CROSSCC" option CONFIG_CROSS_COMPILE="CROSS_PREFIX" option HOSTCC="CROSS_HOSTCC"
I see CONFIG_CROSS_COMPILE being set in newconfig, but I don't know how to use it in Kconfig.
Thanks, Myles
On Fri, Oct 30, 2009 at 9:29 AM, Peter Stuge peter@stuge.se wrote:
Myles Watson wrote:
That functionality is already there... see util/xcompile.
So what's the preferred way to invoke it?
I think Makefile picks it up automatically if there is an .xcompile file in the right spot.http://www.coreboot.org/mailman/listinfo/coreboot
Thanks. My problems getting it to work were:
I hadn't realized that the path to crossgcc was hard coded in xcompile, so xcompile has to be invoked from the right spot:
for gccprefixes in `pwd`/../crossgcc/xgcc/bin/i386-elf- i386-elf- ""; do
I had expected to be able to run xcompile from the top like this: . ./util/xcompile/xcompile > .xcompile the way it works is: cd util/xcompile . ./xcompile > ../../.xcompile
The other problem I had was that the Makefile removes .xcompile on make clean, which is not what I wanted. I'd just generated the .xcompile file, so I did a make clean to make sure the whole thing was compiled with the same compiler.
I think it would be better to remove .xcompile with make distclean. Patch attached.
Signed-off-by: Myles Watson mylesgw@gmail.com
Thanks, Myles
Am Freitag, den 30.10.2009, 12:15 -0600 schrieb Myles Watson:
for gccprefixes in `pwd`/../crossgcc/xgcc/bin/i386-elf- i386-elf- ""; do
Maybe add $PWD/util/crossgcc/xgcc/bin/i386-elf- to the list, too - it can't hurt.
I think it would be better to remove .xcompile with make distclean. Patch attached.
Signed-off-by: Myles Watson mylesgw@gmail.com
Acked-by: Patrick Georgi patrick.georgi@coresystems.de (also applies to the change proposed above)
Patrick
On Fri, Oct 30, 2009 at 1:02 PM, Patrick Georgi patrick@georgi-clan.dewrote:
Am Freitag, den 30.10.2009, 12:15 -0600 schrieb Myles Watson:
for gccprefixes in `pwd`/../crossgcc/xgcc/bin/i386-elf- i386-elf- ""; do
Maybe add $PWD/util/crossgcc/xgcc/bin/i386-elf- to the list, too - it can't hurt.
The only problem with that is then if you have built crosgcc, but you don't want to use it, how do you specify that? The Makefile will generate .xcompile automatically with it included.
Is that the desired behavior?
I think it would be better to remove .xcompile with make distclean. Patch attached.
Signed-off-by: Myles Watson mylesgw@gmail.com
Acked-by: Patrick Georgi patrick.georgi@coresystems.de (also applies to the change proposed above)
I would have committed, but:
myles@orangutan:svn$ svn ci -F commit.txt svn: Commit failed (details follow): svn: Authorization failed
So I guess we can figure out whether we should add the other path to the list first.
Thanks, Myles
Am Freitag, den 30.10.2009, 13:12 -0600 schrieb Myles Watson:
On Fri, Oct 30, 2009 at 1:02 PM, Patrick Georgi patrick@georgi-clan.de wrote: Am Freitag, den 30.10.2009, 12:15 -0600 schrieb Myles Watson: > for gccprefixes in `pwd`/../crossgcc/xgcc/bin/i386-elf- i386-elf- ""; > do
Maybe add $PWD/util/crossgcc/xgcc/bin/i386-elf- to the list, too - it can't hurt.
The only problem with that is then if you have built crosgcc, but you don't want to use it, how do you specify that? The Makefile will generate .xcompile automatically with it included.
Is that the desired behavior?
crossgcc is under our control, stupid distribution compilers are not, so in my opinion, crossgcc should be preferred over alternatives.
Esp. as there's a simple workaround: move xgcc away.
Patrick
On Fri, Oct 30, 2009 at 1:46 PM, Patrick Georgi patrick@georgi-clan.dewrote:
Am Freitag, den 30.10.2009, 13:12 -0600 schrieb Myles Watson:
On Fri, Oct 30, 2009 at 1:02 PM, Patrick Georgi patrick@georgi-clan.de wrote: Am Freitag, den 30.10.2009, 12:15 -0600 schrieb Myles Watson: > for gccprefixes in `pwd`/../crossgcc/xgcc/bin/i386-elf- i386-elf- ""; > do
Maybe add $PWD/util/crossgcc/xgcc/bin/i386-elf- to the list, too - it can't hurt.
The only problem with that is then if you have built crosgcc, but you don't want to use it, how do you specify that? The Makefile will generate .xcompile automatically with it included.
Is that the desired behavior?
crossgcc is under our control, stupid distribution compilers are not, so in my opinion, crossgcc should be preferred over alternatives.
Esp. as there's a simple workaround: move xgcc away.
That sounds fine with me. If someone went to the trouble to build xgcc, default to it.
Here's an updated patch. Will you commit it since my authorization is failing?
Signed-off-by: Myles Watson mylesgw@gmail.com
Thanks, Myles
Patrick Georgi wrote:
Am Freitag, den 30.10.2009, 12:15 -0600 schrieb Myles Watson:
for gccprefixes in `pwd`/../crossgcc/xgcc/bin/i386-elf- i386-elf- ""; do
Maybe add $PWD/util/crossgcc/xgcc/bin/i386-elf- to the list, too - it can't hurt.
Yes, I think the `pwd`/../crossgcc/xgcc/ came from those times when crossgcc was not checked into the coreboot repo...
I think it would be better to remove .xcompile with make distclean. Patch attached.
Signed-off-by: Myles Watson mylesgw@gmail.com
Acked-by: Patrick Georgi patrick.georgi@coresystems.de (also applies to the change proposed above)
Patrick
I think it would be better to remove .xcompile with make distclean.
Signed-off-by: Myles Watson mylesgw@gmail.com
Acked-by: Patrick Georgi patrick.georgi@coresystems.de
Rev 4902.
Thanks, Myles