openrisc: Support both old (or32) and new (or1k) toolchain
PATCH 1/1 openrisc: Support both old (or32) and new (or1k) toolchain
The output file format for openrisc has changed from "elf32-or32" to "elf32-or1k" when using the or1k instead of the older or32 toochain. Select the correct output format automatically to be able to compile the kernel with both toolchain variants.
---
Candidate for -stable ?
arch/openrisc/kernel/vmlinux.lds.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/openrisc/kernel/vmlinux.lds.S +7 -1
@@ -30,7 +30,13 @@ #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
Signature · 1 line
1.9.1
ping ... comments / feedback anyone ?
Guenter
Quoted 33 lines · Guenter Roeck
The output file format for openrisc has changed from "elf32-or32" to "elf32-or1k" when using the or1k instead of the older or32 toochain. Select the correct output format automatically to be able to compile the kernel with both toolchain variants.
Cc Stefan Kristiansson <[email protected]>Signed-off-by Guenter Roeck <[email protected]>---
Candidate for -stable ?arch/openrisc/kernel/vmlinux.lds.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/openrisc/kernel/vmlinux.lds.S +7
-1@@ -30,7 +30,13 @@ #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
Stefan Kristiansson
maintainerQuoted 4 lines · Guenter Roeck
ping ... comments / feedback anyone ?
Guenter
FWIW, I've tested this and it works fine.
Stefan
Quoted 35 lines · Guenter Roeck
Quoted 33 lines
The output file format for openrisc has changed from "elf32-or32" to "elf32-or1k" when using the or1k instead of the older or32 toochain. Select the correct output format automatically to be able to compile the kernel with both toolchain variants.
Cc Stefan Kristiansson <[email protected]>Signed-off-by Guenter Roeck <[email protected]>---
Candidate for -stable ?arch/openrisc/kernel/vmlinux.lds.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/openrisc/kernel/vmlinux.lds.S +7
-1@@ -30,7 +30,13 @@ #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
Quoted 8 lines · Stefan Kristiansson
Quoted 4 lines · Guenter Roeck
ping ... comments / feedback anyone ?
Guenter
FWIW, I've tested this and it works fine.
Hi Stefan,
Great, thanks a lot for testing. Any idea if Jonas is available to send it upstream, or should I try to send it to Linus directly ?
Thanks,
Guenter
Quoted 38 lines
Stefan
Quoted 35 lines · Guenter Roeck
Quoted 33 lines
The output file format for openrisc has changed from "elf32-or32" to "elf32-or1k" when using the or1k instead of the older or32 toochain. Select the correct output format automatically to be able to compile the kernel with both toolchain variants.
Cc Stefan Kristiansson <[email protected]>Signed-off-by Guenter Roeck <[email protected]>---
Candidate for -stable ?arch/openrisc/kernel/vmlinux.lds.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/openrisc/kernel/vmlinux.lds.S +7
-1@@ -30,7 +30,13 @@ #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
Jonas Bonn
maintainerHi Guenter,
Quoted 9 lines · Guenter Roeck
Quoted 8 lines · Stefan Kristiansson
Quoted 4 lines · Guenter Roeck
ping ... comments / feedback anyone ?
Guenter
FWIW, I've tested this and it works fine.
Thanks, the patch is fine... will apply. It's a nice solution to an icky problem...
/Jonas
Quoted 5 lines
Hi Stefan,
Great, thanks a lot for testing. Any idea if Jonas is available to send it upstream,
or should I try to send it to Linus directly ?