Submitter | Myles Watson |
---|---|
Date | 2009-10-26 18:43:55 |
Message ID | <2831fecf0910261143j6275f20cs5aa75da1a58a617c@mail.gmail.com> |
Download | mbox | patch |
Permalink | /patch/492/ |
State | Rejected |
Headers | show |
Comments
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.de>wrote: > 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.de>wrote: > >> 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
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. //Peter
Patch
Index: svn/Makefile =================================================================== --- svn.orig/Makefile +++ svn/Makefile @@ -296,6 +296,10 @@ doxygen-clean: rm -rf $(DOXYGEN_OUTPUT_DIR) clean: doxygen-clean + echo CC=$(CC) + echo CCSTRING=$(CCSTRING) + echo CROSS?=$(CONFIG_CROSS_COMPILE) + echo XCC=$(CONFIG_CROSS_COMPILER) rm -f $(allobjs) build/coreboot* .xcompile rm -f build/option_table.* build/crt0_includes.h build/ldscript rm -f $(obj)/mainboard/$(MAINBOARDDIR)/static.c $(obj)/mainboard/$(MAINBOARDDIR)/config.py $(obj)/mainboard/$(MAINBOARDDIR)/static.dot
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