summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Boie <andrew.p.boie@intel.com>2016-04-26 10:22:39 -0700
committerAnas Nashif <nashif@linux.intel.com>2016-04-27 21:40:54 +0000
commita9a3cdd00d4df08daa64716fc04169a0b3b59c30 (patch)
treea4f8f3ba9d3ee9982d3839a91413a6e7c75c2029
parent1bf37fb6d3fa3c058d7b57ba3f275a2271cf8ca1 (diff)
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>
-rw-r--r--include/linker-tool-gcc.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/linker-tool-gcc.h b/include/linker-tool-gcc.h
index 609cedc35..2190403ce 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
/*