Make CLANG selectable in Kconfig
authorPatrick Georgi <patrick.georgi@coresystems.de>
Tue, 16 Mar 2010 01:17:19 +0000 (01:17 +0000)
committerStefan Reinauer <stepan@openbios.org>
Tue, 16 Mar 2010 01:17:19 +0000 (01:17 +0000)
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5216 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

Makefile
src/Kconfig
util/xcompile/xcompile

index cf038e88a3ca4b0149acd6eaae812113e10018b9..3c97f0ed0a18cfaea5e91de2f6dd42705af59424 100644 (file)
--- a/Makefile
+++ b/Makefile
 ifeq ($(INNER_SCANBUILD),y)
 CC_real:=$(CC)
 endif
+
 $(if $(wildcard .xcompile),,$(eval $(shell bash util/xcompile/xcompile > .xcompile)))
 include .xcompile
+
 ifeq ($(INNER_SCANBUILD),y)
 CC:=$(CC_real)
 HOSTCC:=$(CC_real) --hostcc
@@ -76,6 +78,13 @@ else
 
 include $(top)/.config
 
+ifneq ($(INNER_SCANBUILD),y)
+ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
+CC:=clang -m32
+HOSTCC:=clang
+endif
+endif
+
 ARCHDIR-$(CONFIG_ARCH_X86)    := i386
 ARCHDIR-$(CONFIG_ARCH_POWERPC) := ppc
 
index 1e1de895dfc16fd9fea75e54ab984d8f8b3b5770..55a40ff4f0773072e3fb1ea21f04618304d4919c 100644 (file)
@@ -46,15 +46,28 @@ config CBFS_PREFIX
          Select the prefix to all files put into the image. It's "fallback"
          by default, "normal" is a common alternative.
 
+choice
+       prompt "Compiler"
+       default COMPILER_GCC
+       help
+         This option allows you to select the compiler used for building
+         coreboot.
+
+config COMPILER_GCC
+       bool "GCC"
+config COMPILER_LLVM_CLANG
+       bool "LLVM/clang"
+endchoice
+
 config SCANBUILD_ENABLE
-       bool "build with scan-build for static analysis"
+       bool "Build with scan-build for static analysis"
        default n
        help
          Changes the build process to scan-build is used.
          Requires scan-build in path.
 
 config SCANBUILD_REPORT_LOCATION
-       string "directory to put scan-build report in"
+       string "Directory to put scan-build report in"
        default ""
        depends on SCANBUILD_ENABLE
        help
index 5da78743437a1d5fd2262e77ce67935f7897f916..65e6e704f72a9334a0cfa25d330ef02873c41bf9 100644 (file)
@@ -5,8 +5,8 @@
 # Copyright (C) 2007-2010 coresystems GmbH
 #
 # This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of