libpayload: Add compiler switch

clang is totally untested, but it mirrors coreboot now.

Change-Id: I0e13ff8bba2007159a4a795ca07d187504b606b2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/10800
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Patrick Georgi 2015-07-06 09:04:42 +00:00 committed by Patrick Georgi
parent 3f02466b00
commit b7d8f26eec
2 changed files with 19 additions and 1 deletions

View File

@ -55,6 +55,24 @@ config DEVELOPER
Prompt for developer options. These options are only interesting for Prompt for developer options. These options are only interesting for
libpayload developers. libpayload developers.
choice
prompt "Compiler to use"
default COMPILER_GCC
help
This option allows you to select the compiler.
config COMPILER_GCC
bool "GCC"
help
Use the GNU Compiler Collection (GCC).
config COMPILER_LLVM_CLANG
bool "LLVM/clang"
help
Use LLVM/clang.
endchoice
config REMOTEGDB config REMOTEGDB
bool "Remote GDB stub" bool "Remote GDB stub"
default n default n

View File

@ -182,7 +182,7 @@ report_arch_toolchain() {
# elf${TWIDTH}-${TBFDARCH} toolchain (${GCC}) # elf${TWIDTH}-${TBFDARCH} toolchain (${GCC})
ARCH_SUPPORTED+=${TARCH} ARCH_SUPPORTED+=${TARCH}
SUBARCH_SUPPORTED+=${TSUPP-${TARCH}} SUBARCH_SUPPORTED+=${TSUPP-${TARCH}}
ifeq (\$(CONFIG_COMPILER_GCC),y) ifeq (\$(CONFIG_LP_COMPILER_GCC),y)
CC_${TARCH}:=${GCC} CC_${TARCH}:=${GCC}
CFLAGS_${TARCH}:=${CFLAGS_GCC} CFLAGS_${TARCH}:=${CFLAGS_GCC}
COMPILER_RT_${TARCH}:=${CC_RT_GCC} COMPILER_RT_${TARCH}:=${CC_RT_GCC}