Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752779AbcKNNeg (ORCPT ); Mon, 14 Nov 2016 08:34:36 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35393 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbcKNNdG (ORCPT ); Mon, 14 Nov 2016 08:33:06 -0500 From: Stafford Horne To: stefan.kristiansson@saunalahti.fi, shorne@gmail.com, jonas@southpole.se Cc: linux@roeck-us.net, blue@cmd.nu, robh@kernel.org, linux-kernel@vger.kernel.org, openrisc@lists.librecores.org Subject: [PATCH v2 4/9] openrisc: Support both old (or32) and new (or1k) toolchain Date: Mon, 14 Nov 2016 22:30:34 +0900 Message-Id: <8e7431bdf6d3839f7594282547669d3c2d24311e.1479128947.git.shorne@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479130239-30707-1-git-send-email-shorne@gmail.com> References: <1479130239-30707-1-git-send-email-shorne@gmail.com> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1055 Lines: 34 From: Guenter Roeck The output file format for or1k has changed from "elf32-or32" to "elf32-or1k". Select the correct output format automatically to be able to compile the kernel with both toolchain variants. Signed-off-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Stafford Horne --- 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 d68b9ed..ef31fc2 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.7.4