arch/x86/Makefile.inc: Pass $(AS) and $(CPP) to SeaBIOS

SeaBIOS’ Makefile requires cpp (C Preprocessor) to build. Modify
the xcompile script to search for cpp program path, and pass it to
SeaBIOS’ `Makefile.inc`. Also pass the program path for as (GNU assembler).

This is needed, so the crossgcc toolchain to build the SeaBIOS payload
under Mac OSX. OSX ships a 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>
Reviewed-on: http://review.coreboot.org/3896
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
This commit is contained in:
Andrew Wu 2013-09-03 20:39:48 +08:00 committed by Jonathan A. Kollasch
parent c2a8031a5e
commit cd9abf95e7
3 changed files with 3 additions and 0 deletions

View File

@ -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))

View File

@ -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)"

View File

@ -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