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>
diff --git a/include/linker-tool-gcc.h b/include/linker-tool-gcc.h
index 609cedc..2190403 100644
--- a/include/linker-tool-gcc.h
+++ b/include/linker-tool-gcc.h
@@ -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
/*