Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751013AbdL3PO4 (ORCPT ); Sat, 30 Dec 2017 10:14:56 -0500 Received: from gagarine.paulk.fr ([109.190.93.129]:59368 "EHLO gagarine.paulk.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750945AbdL3POz (ORCPT ); Sat, 30 Dec 2017 10:14:55 -0500 X-Greylist: delayed 330 seconds by postgrey-1.27 at vger.kernel.org; Sat, 30 Dec 2017 10:14:55 EST From: Paul Kocialkowski To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andrew Pinski , Will Deacon , Catalin Marinas , Paul Kocialkowski , stable@vger.kernel.org Subject: [PATCH] arm64: Target aarch64elf emulation to allow bare-metal toolchains Date: Sat, 30 Dec 2017 16:08:59 +0100 Message-Id: <20171230150859.28471-1-contact@paulk.fr> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 982 Lines: 37 This sets the LDFLAGS variable to target the aarch64elf emulation instead of aarch64linux, which is incompatible with bare-metal toolchains. This change allows the kernel to build with bare-metal toolchains again. Fixes: 3d6a7b99e3fa ("arm64: ensure the kernel is compiled for LP64") Cc: stable@vger.kernel.org Signed-off-by: Paul Kocialkowski --- arch/arm64/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index b481b4a7c011..a249233edcd8 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -64,14 +64,14 @@ KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__AARCH64EB__ AS += -EB LD += -EB -LDFLAGS += -maarch64linuxb +LDFLAGS += -maarch64elfb UTS_MACHINE := aarch64_be else KBUILD_CPPFLAGS += -mlittle-endian CHECKFLAGS += -D__AARCH64EL__ AS += -EL LD += -EL -LDFLAGS += -maarch64linux +LDFLAGS += -maarch64elf UTS_MACHINE := aarch64 endif -- 2.15.1