From patchwork Tue May 24 00:04:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 68420 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp350407qge; Mon, 23 May 2016 17:06:00 -0700 (PDT) X-Received: by 10.66.158.98 with SMTP id wt2mr2233764pab.53.1464048357467; Mon, 23 May 2016 17:05:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dd5si198241pab.188.2016.05.23.17.05.57; Mon, 23 May 2016 17:05:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753368AbcEXAFy (ORCPT + 30 others); Mon, 23 May 2016 20:05:54 -0400 Received: from mail-bl2on0059.outbound.protection.outlook.com ([65.55.169.59]:65053 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753102AbcEXAFm (ORCPT ); Mon, 23 May 2016 20:05:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dkWqiF5nUs/EU0RrxzDT3kyik4sTmGhZPlJd8mAxo20=; b=QT7R4Huh1xDA7jLxwsC19B963LTH4MI4qaIc+skvlCtgn2QZ6lx4kj7gBIutmfBrorzAOC6Z/RgbcULC3h3TuC23r8Vv9foltjp+AirBGUmYCSCTWkN5C1wbMvXOeGJmmmP5PewP8oQBV0/Y5N0zlKIquZ7thzQL0J4sGPO2g1o= Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (50.233.148.158) by CY1PR07MB2230.namprd07.prod.outlook.com (10.164.112.144) with Microsoft SMTP Server (TLS) id 15.1.497.12; Tue, 24 May 2016 00:05:38 +0000 From: Yury Norov To: , , , , , , , CC: , , , , , , , , , , , , , , , , Andrew Pinski , Andrew Pinski Subject: [PATCH 09/23] arm64: ensure the kernel is compiled for LP64 Date: Tue, 24 May 2016 03:04:38 +0300 Message-ID: <1464048292-30136-10-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> References: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [50.233.148.158] X-ClientProxiedBy: DM3PR13CA0026.namprd13.prod.outlook.com (10.164.193.36) To CY1PR07MB2230.namprd07.prod.outlook.com (10.164.112.144) X-MS-Office365-Filtering-Correlation-Id: b2552278-5ca9-465e-275e-08d383672359 X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 2:kpAgs1YM2No9NIS71NJ2bpB4G6schH4CeKUo9kCmG0ltDaWPwqGZTACxL7wShUiuW7GUCsayKjaS1NS27P3unhf9odVnaa61kNUUle67eAExww8t0KXi8rWFwfxLcE6P6nbyz0LbCLMpnSTSnRqCFDyHW9AYM7xpiKKlGKTp695xtrLjbZdNm0BeSzR7nZM7; 3:tO0JN7PX1iFSy17o4aKrwcAcChhvpxAmBR2fUQERjENkPnmYq1RWhQBAK9Opc/LDRJzqpNRpDWLwZuaT5M0yhw3GSPq7krZEgkuyz/Io0rkj5SYImhE1UnAGr/6hIwP+; 25:Uw6kIYNpUOmpkicDrqn6efptz1ZYf/OGHZL/+mMnJuCrLGhkLG2ujunBFQFizkJ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nRTEY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:CY1PR07MB2230; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2230; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 4:3PWgF9aGjzFJVcXQ9uAt/zsAK1hfJu/13ZO59/Mbx40xfikxncKG7G+h5tLOWi/tTKjCht4bwzxCSr3pV/W0zDlur5cC52H0EVsjbI/fKVF3cFurNZ4zhZspWiKoGeHZq9+3lTsCXXzQOTJJ/K3LTkl9ljqODOjxV5blTmLYIW/KD5s1M/zZ1OhJQPOpyMmnPMP2VgmfmEt7K4uDW25XVKoLAGvAl2mkW32NssE7EfN2IMBaoaTIgBUJP81AgGtafTiKLsFoxEcgykHT8ScPpDtWiDQhx3hQ71sOxxOzMqAXjLFVvUiIKd43HdBkIDf1klfzHK6NFJA/sB+Rv7IUe652Cql9dnDTA95TqLqex0UvzZodSoQYiweiIH++FBRI X-Forefront-PRVS: 09525C61DB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(19580395003)(36756003)(5004730100002)(19580405001)(5008740100001)(2906002)(229853001)(2201001)(4001430100002)(586003)(47776003)(33646002)(4326007)(66066001)(6116002)(76506005)(42186005)(92566002)(77096005)(2950100001)(189998001)(107886002)(5001770100001)(81166006)(5003940100001)(76176999)(50986999)(50226002)(50466002)(48376002)(8676002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2230; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 23:ecirWnHNzlIA083s4iinGgLTIn6izwQKYvb8XIvXAShxHQmFpMAFvfuBbQo69E74XvUWmWl7OJ+RiWXi0QmUm/V/TRt/FFBc8KyjfCHnq6jIcs012DUbJJDsYnlg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64fIsolQmzmK0tOiJFaf2bOgLplOKaZZqVWP9HS8a1tcDlGEY+0nBSCXWEn2OHYvPl0aHbnjE=; 7:eJo6S2bZ7dH/GFfEydiVeN12MMWDgiKTD9DRpFCbZzlJr70DD1czh3n6o1fkHCk5Dh8COkb15jbX1hZYHl5flmc3Ag7j7JlkPZtXyN6lai96NGHu8IzBFe+1nOcZlg24RuzsCUdZXzXBdIdiJwrRSizd5gNE9oBcxhGjpXAa2LDVSk7DIYMh6iM3O9pGSr3K SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 00:05:38.5256 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2230 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrew Pinski The kernel needs to be compiled as a LP64 binary for ARM64, even when using a compiler that defaults to code-generation for the ILP32 ABI. Consequently, we need to explicitly pass '-mabi=lp64' (supported on gcc-4.9 and newer). Signed-off-by: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Reviewed-by: David Daney --- arch/arm64/Makefile | 5 +++++ 1 file changed, 5 insertions(+) -- 2.5.0 diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 354d754..29ebf23 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -35,14 +35,19 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads) KBUILD_AFLAGS += $(lseinstr) +KBUILD_CFLAGS += $(call cc-option,-mabi=lp64) +KBUILD_AFLAGS += $(call cc-option,-mabi=lp64) + ifeq ($(CONFIG_CPU_BIG_ENDIAN), y) KBUILD_CPPFLAGS += -mbig-endian AS += -EB LD += -EB +LDFLAGS += -maarch64linuxb else KBUILD_CPPFLAGS += -mlittle-endian AS += -EL LD += -EL +LDFLAGS += -maarch64linux endif CHECKFLAGS += -D__aarch64__