Skip to content

Commit 1f43e23

Browse files
groeckstffrdhrn
authored andcommitted
openrisc: Support both old (or32) and new (or1k) toolchain
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>
1 parent e60aa2f commit 1f43e23

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎arch/openrisc/kernel/vmlinux.lds.S‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@
3030
#include <asm/cache.h>
3131
#include <asm-generic/vmlinux.lds.h>
3232

33-
OUTPUT_FORMAT("elf32-or32", "elf32-or32", "elf32-or32")
33+
#ifdef __OR1K__
34+
#define __OUTPUT_FORMAT "elf32-or1k"
35+
#else
36+
#define __OUTPUT_FORMAT "elf32-or32"
37+
#endif
38+
39+
OUTPUT_FORMAT(__OUTPUT_FORMAT, __OUTPUT_FORMAT, __OUTPUT_FORMAT)
3440
jiffies = jiffies_64 + 4;
3541

3642
SECTIONS

0 commit comments

Comments
 (0)