openrisc: Support both old (or32) and new (or1k) toolchain
authorGuenter Roeck <linux@roeck-us.net>
Sat, 19 Jul 2014 21:39:08 +0000 (00:39 +0300)
committerStafford Horne <shorne@gmail.com>
Mon, 12 Dec 2016 14:09:40 +0000 (23:09 +0900)
The output file format for or1k has changed from "elf32-or32"
to "elf32-or1k". Select the correct output format automatically
to be able to compile the kernel with both toolchain variants.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/vmlinux.lds.S

index d68b9ede84231fe618062a68b190491cd25eeba6..ef31fc24344e983c67b6f2b9c185a9275d456ed1 100644 (file)
 #include <asm/cache.h>
 #include <asm-generic/vmlinux.lds.h>
 
-OUTPUT_FORMAT("elf32-or32", "elf32-or32", "elf32-or32")
+#ifdef __OR1K__
+#define __OUTPUT_FORMAT        "elf32-or1k"
+#else
+#define __OUTPUT_FORMAT        "elf32-or32"
+#endif
+
+OUTPUT_FORMAT(__OUTPUT_FORMAT, __OUTPUT_FORMAT, __OUTPUT_FORMAT)
 jiffies = jiffies_64 + 4;
 
 SECTIONS