From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934024AbbEMQ5F (ORCPT ); Wed, 13 May 2015 12:57:05 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:38054 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753381AbbEMQ5B (ORCPT ); Wed, 13 May 2015 12:57:01 -0400 From: Guenter Roeck To: linux-kernel@vger.kernel.org Cc: openrisc@lists.opencores.org, Jonas Bonn , Paul Bolle , anees , Andrew Morton , Guenter Roeck , Stefan Kristiansson Subject: [PATCH resend] openrisc: Support both old (or32) and new (or1k) toolchain Date: Wed, 13 May 2015 09:56:54 -0700 Message-Id: <1431536214-2623-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.1.0 X-Authenticated_sender: guenter@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: guenter@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 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 Acked-by: Jonas Bonn Signed-off-by: Guenter Roeck --- Andrew, please apply this patch directly. Per Jonas: "Unfortunately, I'm not currently in a position to do anything meaningful with it, so please send it upstream directly via Andrew Morton's collection of assorted patches" arch/openrisc/kernel/vmlinux.lds.S | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/openrisc/kernel/vmlinux.lds.S b/arch/openrisc/kernel/vmlinux.lds.S index 2d69a853b742..1c5d21a10305 100644 --- a/arch/openrisc/kernel/vmlinux.lds.S +++ b/arch/openrisc/kernel/vmlinux.lds.S @@ -30,7 +30,13 @@ #include #include -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 -- 2.1.0