[coreboot] [PATCH]add arm toolchain support

Patrick Georgi patrick at georgi-clan.de
Wed May 25 15:14:38 CEST 2011


Am 23.05.2011 14:14, schrieb Hamo:
> +ifeq ($(CONFIG_ARCH_X86),y)
> +ifeq ($(NO_i386_TOOLCHAIN),1)
> +$(error No suitable gcc for X86 found)
> +else
>  ifneq ($(INNER_SCANBUILD),y)
> +CC:=$(CC_i386)
> +endif
> +AS:=$(AS_i386)
> +AR:=$(AR_i386)
> +LD:=$(LD_i386)
That could be implemented somewhat more generic by using nested variable
expansion:

CC:=$(CC_$(CONFIG_ARCH))

and have Kconfig select the right ARCH value depending on the other
booleans:

config ARCH
     string
     default X86 if ARCH_X86
     default ARM if ARCH_ARM

And the test for "suitable toolchain found" can be generalized by
testing for _some_ value in $(CC) after the assignements happened:

ifeq ($(CC),)
$(error no toolchain for architecture '$(CONFIG_ARCH)' found)
endif


Patrick




More information about the coreboot mailing list