From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933008AbbELNqO (ORCPT ); Tue, 12 May 2015 09:46:14 -0400 Received: from mail-la0-f42.google.com ([209.85.215.42]:35640 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932616AbbELNqN (ORCPT ); Tue, 12 May 2015 09:46:13 -0400 From: anees To: Jonas Bonn , linux@lists.openrisc.net Cc: linux-kernel@vger.kernel.org, anees Subject: [PATCH 1/1] OpenRISC: Fix kernel build problem on OpenRISC Date: Tue, 12 May 2015 15:45:21 +0200 Message-Id: <1431438321-4697-1-git-send-email-rean12is@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 #include #include -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