Index: svn/Makefile
===================================================================
--- svn.orig/Makefile
+++ svn/Makefile
@@ -60,12 +60,19 @@ ifneq ($(Q),)
 endif
 endif
 
-CPP:= $(CC) -x assembler-with-cpp -DASSEMBLY -E
+CCSTRING="CC "
+
+ifeq ($(CONFIG_CROSS_COMPILE),y)
+CC=$(CONFIG_CROSS_COMPILER)
+CCSTRING="XCC"
+endif
+
+CPP= $(CC) -x assembler-with-cpp -DASSEMBLY -E
 HOSTCC = gcc
 HOSTCXX = g++
 HOSTCFLAGS := -I$(srck) -I$(objk) -g
 HOSTCXXFLAGS := -I$(srck) -I$(objk)
-LIBGCC_FILE_NAME := $(shell $(CC) -print-libgcc-file-name)
+LIBGCC_FILE_NAME = $(shell $(CC) -print-libgcc-file-name )
 
 DESTDIR = /opt
 
@@ -159,49 +166,49 @@ endef
 
 define objs_c_template
 $(obj)/$(1)%.o: src/$(1)%.c
-	@printf "    CC         $$(subst $$(shell pwd)/,,$$(@))\n"
+	@printf "    $(CCSTRING)        $$(subst $$(shell pwd)/,,$$(@))\n"
 	$(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
 endef
 
 define objs_S_template
 $(obj)/$(1)%.o: src/$(1)%.S
-	@printf "    CC         $$(subst $$(shell pwd)/,,$$(@))\n"
+	@printf "    $(CCSTRING)        $$(subst $$(shell pwd)/,,$$(@))\n"
 	$(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$<
 endef
 
 define initobjs_c_template
 $(obj)/$(1)%.o: src/$(1)%.c
-	@printf "    CC         $$(subst $$(shell pwd)/,,$$(@))\n"
+	@printf "    $(CCSTRING)        $$(subst $$(shell pwd)/,,$$(@))\n"
 	$(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
 endef
 
 define initobjs_S_template
 $(obj)/$(1)%.o: src/$(1)%.S
-	@printf "    CC         $$(subst $$(shell pwd)/,,$$(@))\n"
+	@printf "    $(CCSTRING)        $$(subst $$(shell pwd)/,,$$(@))\n"
 	$(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$<
 endef
 
 define drivers_c_template
 $(obj)/$(1)%.o: src/$(1)%.c
-	@printf "    CC         $$(subst $$(shell pwd)/,,$$(@))\n"
+	@printf "    $(CCSTRING)        $$(subst $$(shell pwd)/,,$$(@))\n"
 	$(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
 endef
 
 define drivers_S_template
 $(obj)/$(1)%.o: src/$(1)%.S
-	@printf "    CC         $$(subst $$(shell pwd)/,,$$(@))\n"
+	@printf "    $(CCSTRING)        $$(subst $$(shell pwd)/,,$$(@))\n"
 	$(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$<
 endef
 
 define smmobjs_c_template
 $(obj)/$(1)%.o: src/$(1)%.c
-	@printf "    CC         $$(subst $$(shell pwd)/,,$$(@))\n"
+	@printf "    $(CCSTRING)        $$(subst $$(shell pwd)/,,$$(@))\n"
 	$(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
 endef
 
 define smmobjs_S_template
 $(obj)/$(1)%.o: src/$(1)%.S
-	@printf "    CC         $$(subst $$(shell pwd)/,,$$(@))\n"
+	@printf "    $(CCSTRING)        $$(subst $$(shell pwd)/,,$$(@))\n"
 	$(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
 endef
 
Index: svn/src/Kconfig
===================================================================
--- svn.orig/src/Kconfig
+++ svn/src/Kconfig
@@ -47,6 +47,17 @@ config LOCALVERSION
 	  the coreboot version number, so that you can easily distinguish
 	  boot logs of different boards from each other.
 
+config CROSS_COMPILE
+	bool "Specify a specific compiler"
+	default n
+	help
+	  Use a specific compiler to build coreboot.
+
+config CROSS_COMPILER
+	string "Path to a cross compiler"
+	depends on CROSS_COMPILE
+	default "util/crossgcc/xgcc/bin/i386-elf-gcc"
+
 endmenu
 
 source src/mainboard/Kconfig
Index: svn/src/arch/i386/Makefile.inc
===================================================================
--- svn.orig/src/arch/i386/Makefile.inc
+++ svn/src/arch/i386/Makefile.inc
@@ -75,12 +75,12 @@ $(obj)/build_opt_tbl: $(top)/util/option
 # Build the coreboot_ram (stage 2)
 
 $(obj)/coreboot_ram: $(obj)/coreboot_ram.o $(src)/config/coreboot_ram.ld #ldoptions
-	@printf "    CC         $(subst $(obj)/,,$(@))\n"
+	@printf "    $(CCSTRING)        $(subst $(obj)/,,$(@))\n"
 	$(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(src)/config/coreboot_ram.ld $(obj)/coreboot_ram.o
 	$(NM) -n $(obj)/coreboot_ram | sort > $(obj)/coreboot_ram.map
 
 $(obj)/coreboot_ram.o: $(obj)/arch/i386/lib/c_start.o $(drivers) $(obj)/coreboot.a $(LIBGCC_FILE_NAME)
-	@printf "    CC         $(subst $(obj)/,,$(@))\n"
+	@printf "    $(CCSTRING)        $(subst $(obj)/,,$(@))\n"
 	$(CC) -nostdlib -r -o $@ $(obj)/arch/i386/lib/c_start.o $(drivers) -Wl,-\( $(obj)/coreboot.a $(LIBGCC_FILE_NAME) -Wl,-\)
 
 $(obj)/coreboot.a: $(objs)
