build system: re-enable clang use
Change-Id: I6e07fdec449d0b259d77986f65a60aa36d367cc8 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/5747 Tested-by: build bot (Jenkins)
This commit is contained in:
parent
20ea04034d
commit
cc84a001b8
24
Makefile
24
Makefile
|
@ -107,13 +107,31 @@ else
|
||||||
|
|
||||||
include $(HAVE_DOTCONFIG)
|
include $(HAVE_DOTCONFIG)
|
||||||
|
|
||||||
include toolchain.inc
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
|
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
|
||||||
CC:=clang -m32 -mno-mmx -mno-sse -no-integrated-as
|
# FIXME: armv7/aarch64 won't build right now
|
||||||
|
CFLAGS_x86_32 = -no-integrated-as -Qunused-arguments -target i386-elf -m32
|
||||||
|
CC_x86_32:=clang
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_MMX),y)
|
||||||
|
CFLAGS_x86_32 += -mno-mmx
|
||||||
|
endif
|
||||||
|
|
||||||
|
# FIXME: we end up with conflicting flags with this, not clear on this part.
|
||||||
|
#ifneq ($(CONFIG_SSE),y)
|
||||||
|
#CFLAGS_x86_32 += -mno-sse
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CFLAGS_armv7 = -no-integrated-as -Qunused-arguments -target armv7-eabi -ccc-gcc-name $(CC_armv7)
|
||||||
|
CC_armv7:=clang
|
||||||
|
|
||||||
|
CFLAGS_aarch64 = -no-integrated-as -Qunused-arguments -target aarch64-eabi -ccc-gcc-name $(CC_aarch64)
|
||||||
|
CC_aarch64:=clang
|
||||||
|
|
||||||
HOSTCC:=clang
|
HOSTCC:=clang
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
include toolchain.inc
|
||||||
|
|
||||||
strip_quotes = $(subst ",,$(subst \",,$(1)))
|
strip_quotes = $(subst ",,$(subst \",,$(1)))
|
||||||
|
|
||||||
# The primary target needs to be here before we include the
|
# The primary target needs to be here before we include the
|
||||||
|
|
|
@ -218,7 +218,7 @@ CPPFLAGS_common := -Isrc -Isrc/include -I$(obj)
|
||||||
CPPFLAGS_common += -Isrc/device/oprom/include
|
CPPFLAGS_common += -Isrc/device/oprom/include
|
||||||
CPPFLAGS_common += -include $(src)/include/kconfig.h
|
CPPFLAGS_common += -include $(src)/include/kconfig.h
|
||||||
|
|
||||||
CFLAGS_common = -Os -pipe -g -nostdinc
|
CFLAGS_common += -Os -pipe -g -nostdinc
|
||||||
CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
|
CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
|
||||||
CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
|
CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
|
||||||
CFLAGS_common += -Wstrict-aliasing -Wshadow
|
CFLAGS_common += -Wstrict-aliasing -Wshadow
|
||||||
|
|
Loading…
Reference in New Issue