[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1431438321-4697-1-git-send-email-rean12is@gmail.com>
Date: Tue, 12 May 2015 15:45:21 +0200
From: anees <rean12is@...il.com>
To: Jonas Bonn <jonas@...thpole.se>, linux@...ts.openrisc.net
Cc: linux-kernel@...r.kernel.org, anees <rean12is@...il.com>
Subject: [PATCH 1/1] OpenRISC: Fix kernel build problem on OpenRISC
Kernel build fails with error "target elf32-or32 not found"
This is due to the change in OpenRISC compiler prefix from "or12"
to "or1k". Add config options that set architecture output format
default to "or1k" but also allow user to select older prefix.
Tested with gcc version 4.9.1 uclibc
Signed-off-by: anees <rean12is@...il.com>
---
arch/openrisc/Kconfig | 12 ++++++++++++
arch/openrisc/kernel/vmlinux.lds.S | 6 +++---
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index e5a693b..c7fe7c8 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -75,6 +75,18 @@ config OPENRISC_BUILTIN_DTB
string "Builtin DTB"
default ""
+config OUTPUT_FORMAT_TYPE
+ string "Architecture output format type"
+ default "or1k"
+ help
+ Write "or12" if building kernel against an older toolchain
+ else leave the default (or1k)
+
+config OUTPUT_FORMAT
+ string
+ default "elf32-or1k" if OUTPUT_FORMAT_TYPE = "or1k"
+ default "elf32-or12" if OUTPUT_FORMAT_TYPE = "or12"
+
menu "Class II Instructions"
config OPENRISC_HAVE_INST_FF1
diff --git a/arch/openrisc/kernel/vmlinux.lds.S b/arch/openrisc/kernel/vmlinux.lds.S
index 2d69a85..5cd274c 100644
--- a/arch/openrisc/kernel/vmlinux.lds.S
+++ b/arch/openrisc/kernel/vmlinux.lds.S
@@ -23,14 +23,14 @@
* - recheck if all aligments are really needed
*/
-# define LOAD_OFFSET PAGE_OFFSET
-# define LOAD_BASE PAGE_OFFSET
+#define LOAD_OFFSET PAGE_OFFSET
+#define LOAD_BASE PAGE_OFFSET
#include <asm/page.h>
#include <asm/cache.h>
#include <asm-generic/vmlinux.lds.h>
-OUTPUT_FORMAT("elf32-or32", "elf32-or32", "elf32-or32")
+OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
jiffies = jiffies_64 + 4;
SECTIONS
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists