From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934201AbbEMNU5 (ORCPT ); Wed, 13 May 2015 09:20:57 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:58962 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933344AbbEMNUz (ORCPT ); Wed, 13 May 2015 09:20:55 -0400 Message-ID: <55534FB4.1070709@roeck-us.net> Date: Wed, 13 May 2015 06:20:52 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Paul Bolle CC: anees , Jonas Bonn , linux@lists.openrisc.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] OpenRISC: Fix kernel build problem on OpenRISC References: <1431438321-4697-1-git-send-email-rean12is@gmail.com> <20150512200743.GA6155@roeck-us.net> <1431511102.2398.187.camel@x220> In-Reply-To: <1431511102.2398.187.camel@x220> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/13/2015 02:58 AM, Paul Bolle wrote: > On Tue, 2015-05-12 at 13:07 -0700, Guenter Roeck wrote: >> On Tue, May 12, 2015 at 03:45:21PM +0200, anees wrote: >>> 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) >>> + >> That means I'll have to use different toolchains for different kernel >> versions, or hand-edit default configuration files to able to work >> with the same toolchain. Both is, from a testing perspective, >> quite annoying. > > Also quite annoying would be > $ grep OUTPUT_FORMAT .config > CONFIG_OUTPUT_FORMAT_TYPE="typo" > > (Note the missing CONFIG_OUTPUT_FORMAT= line.) > > What might be less annoying would be something (completely untested) > like: > choice > prompt "Architecture output format type" > default OUTPUT_FORMAT_OR1K > help > Choose "or12" if building kernel against an older toolchain > else leave the default "or1k". > > config OUTPUT_FORMAT_OR1K > bool "or1k" > > config OUTPUT_FORMAT_OR12 > bool "or12" > > enchoice > > config OUTPUT_FORMAT > string > default "elf32-or1k" if OUTPUT_FORMAT_OR1K > default "elf32-or12" if OUTPUT_FORMAT_OR12 > >> Maybe I should simply stop testing older kernels for openrisc >> after this patch has been merged; that would be much easier. >> Jonas, is that ok with you ? > > Would testing be easier if you'd be provided with two defconfig files? > Ie, one for "elf32-or1k" and "elf32-or12". > Just remembered ... or just apply https://lkml.org/lkml/2014/9/19/11 instead. Guenter