linker-tool-gcc: improve readability

This no longer defaults to X86 and instead throws an error if a
supported arch isn't found. Output format now checks CONFIG_ARM
instead of Cortex M3, should be the same for all ARM chips.

Change-Id: Ib9bf07ad93a44b3f7cdac7b52432110776eb23fd
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-04-26 10:22:39 -07:00 committed by Anas Nashif
commit a9a3cdd00d

View file

@ -25,18 +25,20 @@
#ifndef __LINKER_TOOL_GCC_H
#define __LINKER_TOOL_GCC_H
#if defined(CONFIG_CPU_CORTEX_M)
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
#if defined(CONFIG_ARM)
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
#elif defined(CONFIG_ARC)
OUTPUT_FORMAT("elf32-littlearc", "elf32-bigarc", "elf32-littlearc")
OUTPUT_FORMAT("elf32-littlearc", "elf32-bigarc", "elf32-littlearc")
#elif defined(CONFIG_X86)
#if defined(__IAMCU)
OUTPUT_FORMAT("elf32-iamcu")
OUTPUT_ARCH(iamcu:intel)
#else
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
#endif
#else
#if defined(__IAMCU)
OUTPUT_FORMAT("elf32-iamcu")
OUTPUT_ARCH(iamcu:intel)
#else
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
#endif
#error Arch not supported.
#endif
/*