diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2012-11-26 14:33:09 -0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2012-11-27 02:06:07 +0100 |
commit | e820e5cb3aed810fa9ba6047ce9b8bf352335e32 (patch) | |
tree | 0799c5a295a8f66f15491a95321aa952294bd78f /Makefile | |
parent | 534c8a013ff57c2b7dc15f55dea0cf4dbf3ce7bd (diff) | |
download | coreboot-e820e5cb3aed810fa9ba6047ce9b8bf352335e32.tar.xz |
Make xcompile support multiple architectures
With this change the the xcompile script now creates environment variables
for more than one architecture.
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Change-Id: I349a1fd1d865ef16979f1dfd6aeca12b1ee2eed6
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/1915
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -78,7 +78,6 @@ HOSTCC = gcc HOSTCXX = g++ HOSTCFLAGS := -g HOSTCXXFLAGS := -g -LIBGCC_FILE_NAME := $(shell test -r `$(CC) -print-libgcc-file-name` && $(CC) -print-libgcc-file-name) DOXYGEN := doxygen DOXYGEN_OUTPUT_DIR := doxygen @@ -114,6 +113,31 @@ else include $(HAVE_DOTCONFIG) +ARCHDIR-$(CONFIG_ARCH_ARM) := armv7 +ARCHDIR-$(CONFIG_ARCH_X86) := x86 + +ARCH-y := $(ARCHDIR-y) + +# If architecture folder name is different from GCC binutils architecture name, +# override here. +ARCH-$(CONFIG_ARCH_ARM) := littlearm +ARCH-$(CONFIG_ARCH_X86) := i386 + +CC := $(CC_$(ARCH-y)) +AS := $(AS_$(ARCH-y)) +LD := $(LD_$(ARCH-y)) +NM := $(NM_$(ARCH-y)) +OBJCOPY := $(OBJCOPY_$(ARCH-y)) +OBJDUMP := $(OBJDUMP_$(ARCH-y)) +READELF := $(READELF_$(ARCH-y)) +STRIP := $(STRIP_$(ARCH-y)) +AR := $(AR_$(ARCH-y)) + +CFLAGS += $(CFLAGS_$(ARCH-y)) + +LIBGCC_FILE_NAME := $(shell test -r `$(CC) -print-libgcc-file-name` && \ + $(CC) -print-libgcc-file-name) + ifneq ($(INNER_SCANBUILD),y) ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y) CC:=clang -m32 -mno-mmx -mno-sse |