Andrew Wu (arw@dmp.com.tw) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3896
-gerrit
commit b99b1f054d9c704100479ccdfa6879994f195c00 Author: Andrew Wu arw@dmp.com.tw Date: Tue Sep 3 20:39:48 2013 +0800
Searching for cpp program path and pass it to SeaBIOS Makefile.
SeaBIOS Makefile requires cpp(C Preprocessor) to build. Modify xcompile script to search for cpp program path, and pass it to SeaBIOS Makefile.inc. Also pass as(GNU assembler) program path.
This patch makes using crossgcc toolchain to build SeaBIOS payload under Mac OSX works. OSX has built-in cpp program, but it works differently from GNU CPP, so we need to override it.
Change-Id: If996ffbb76ec4bd16079b54b41f3fac07bfe25be Signed-off-by: Andrew Wu arw@dmp.com.tw --- Makefile | 1 + src/arch/x86/Makefile.inc | 1 + util/xcompile/xcompile | 1 + 3 files changed, 3 insertions(+)
diff --git a/Makefile b/Makefile index dec32e5..b709d14 100644 --- a/Makefile +++ b/Makefile @@ -126,6 +126,7 @@ ARCH-$(CONFIG_ARCH_X86) := i386 ifneq ($(INNER_SCANBUILD),y) CC := $(CC_$(ARCH-y)) endif +CPP := $(CPP_$(ARCH-y)) AS := $(AS_$(ARCH-y)) LD := $(LD_$(ARCH-y)) NM := $(NM_$(ARCH-y)) diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index b3b82b9..f8e9384 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -427,6 +427,7 @@ seabios: HOSTCC="$(HOSTCC)" \ CC="$(CC)" LD="$(LD)" OBJDUMP="$(OBJDUMP)" \ OBJCOPY="$(OBJCOPY)" STRIP="$(STRIP)" \ + AS=$(AS) CPP="$(CPP)" \ CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \ CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \ OUT=$(abspath $(obj)) IASL="$(IASL)" diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index ff12217..c4b8f54 100644 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -117,6 +117,7 @@ report_arch_toolchain() { cat <<EOF # elf${TWIDTH}-${TBFDARCH} toolchain (${GCCPREFIX}gcc) CC_${TARCH}:=${GCCPREFIX}gcc ${CFLAGS} +CPP_${TARCH}:=${GCCPREFIX}cpp AS_${TARCH}:=${GCCPREFIX}as ${ASFLAGS} LD_${TARCH}:=${GCCPREFIX}ld${LINKER_SUFFIX} ${LDFLAGS} NM_${TARCH}:=${GCCPREFIX}nm