Commit ce836e2c authored by Anas Nashif's avatar Anas Nashif Committed by Anas Nashif
Browse files

toolchain: move iamcu output format/arch to SoC



Instead of defining the output format in the toolchain environment
setup, define this per SoC that supports the ABI.

This will allow us to directly referencing an installed toolchain
without the need for declaring ZEPHYR_GCC_VARIANT

Change-Id: Icd1a7a21acbf075a51854fb2ebb3ef06788ce9b5
Signed-off-by: default avatarAnas Nashif <anas.nashif@intel.com>
parent 69c7f1e6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
ifeq ($(CONFIG_X86_IAMCU),y)
LD_TOOLCHAIN ?= -D__GCC_LINKER_CMD__ -D__IAMCU
OUTPUT_FORMAT = elf32-iamcu
OUTPUT_ARCH = iamcu:intel
KBUILD_CFLAGS += $(call cc-option,-msoft-float)
endif

KBUILD_CFLAGS += $(call cc-option,-march=pentium)
KBUILD_CXXFLAGS += $(call cc-option,-march=pentium)
KBUILD_AFLAGS += $(KBUILD_CFLAGS)
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@ arch-cflags = $(call cc-option,-march=lakemont -mtune=lakemont -msoft-float, -ma

ifeq ($(CONFIG_X86_IAMCU),y)
arch-cflags += $(call cc-option,-miamcu)
LD_TOOLCHAIN ?= -D__GCC_LINKER_CMD__ -D__IAMCU
OUTPUT_FORMAT = elf32-iamcu
OUTPUT_ARCH = iamcu:intel
else
arch-cflags += $(call cc-option,-mno-iamcu)
endif
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@ arch-cflags = $(call cc-option,-march=lakemont -mtune=lakemont -msoft-float, -ma

ifeq ($(CONFIG_X86_IAMCU),y)
arch-cflags += $(call cc-option,-miamcu)
LD_TOOLCHAIN ?= -D__GCC_LINKER_CMD__ -D__IAMCU
OUTPUT_FORMAT = elf32-iamcu
OUTPUT_ARCH = iamcu:intel
else
arch-cflags += $(call cc-option,-mno-iamcu)
endif
+0 −4
Original line number Diff line number Diff line
@@ -17,8 +17,4 @@ LIB_INCLUDE_DIR = $(LIB_INCLUDE_DIR_$(ARCH))
TOOLCHAIN_LIBS = gcc
TOOLCHAIN_CFLAGS = $(TOOLCHAIN_CFLAGS_$(ARCH))

LD_TOOLCHAIN ?= -D__GCC_LINKER_CMD__ -D__IAMCU
OUTPUT_FORMAT = elf32-iamcu
OUTPUT_ARCH = iamcu:intel

export CROSS_COMPILE TOOLCHAIN_LIBS LIB_INCLUDE_DIR TOOLCHAIN_CFLAGS
+0 −7
Original line number Diff line number Diff line
@@ -58,13 +58,6 @@ LIB_INCLUDE_DIR = $(LIB_INCLUDE_DIR_$(ARCH))
TOOLCHAIN_CFLAGS = $(TOOLCHAIN_CFLAGS_$(ARCH))
endif

ifeq ($(CONFIG_TOOLCHAIN_VARIANT),"iamcu")
LD_TOOLCHAIN ?= -D__GCC_LINKER_CMD__ -D__IAMCU
OUTPUT_FORMAT = elf32-iamcu
OUTPUT_ARCH = iamcu:intel
endif


QEMU_BIN_PATH ?= $(TOOLCHAIN_HOME)/usr/bin
QEMU           = $(QEMU_BIN_PATH)/$(QEMU_$(SRCARCH))
QEMU_BIOS=$(TOOLCHAIN_HOME)/usr/share/qemu