OSDN Git Service

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 d68b9ed..ef31fc2 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