From patchwork Fri Oct 21 20:33:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9390079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 725E360231 for ; Fri, 21 Oct 2016 20:36:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 640F029E8F for ; Fri, 21 Oct 2016 20:36:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5851029F0E; Fri, 21 Oct 2016 20:36:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D19AD29E8F for ; Fri, 21 Oct 2016 20:36:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxgXM-0003ox-5S; Fri, 21 Oct 2016 20:35:32 +0000 Received: from mail-co1nam03on0086.outbound.protection.outlook.com ([104.47.40.86] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxgWS-0002Fx-Ay for linux-arm-kernel@lists.infradead.org; Fri, 21 Oct 2016 20:34:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QPe+9sGtjR4GHZOTtVRWeDajrSSg/SS83MhSPA1IMZM=; b=k5ErUQuUWkEVsyqWcbAuTS6TycY6cNa6OAGvmt34r0Bx8eTxL1XOKN+ISkdkG0sgrwXxjkMPAGnxQ2BXU6aBtAX4yi/Ktc+Wzav7MkgViENGO7orD4OohfLkyInuyloBk/qcTUJnrZmUwW1Stpqge5TAO2LksXG18BrYVGb30BQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by DM3PR07MB2251.namprd07.prod.outlook.com (10.164.33.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Fri, 21 Oct 2016 20:34:14 +0000 From: Yury Norov To: , , , , , Subject: [PATCH 04/18] arm64: ensure the kernel is compiled for LP64 Date: Fri, 21 Oct 2016 23:33:03 +0300 Message-ID: <1477081997-4770-5-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> References: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: VI1PR07CA0051.eurprd07.prod.outlook.com (10.164.94.147) To DM3PR07MB2251.namprd07.prod.outlook.com (10.164.33.149) X-MS-Office365-Filtering-Correlation-Id: bcb9f2a0-6506-42eb-2a28-08d3f9f19f50 X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2251; 2:tBjjL/H0hw+DtBLg0G/Vp0XwDrVfHIGbBzsP0ViUky81VduwGvZ6wx5CVm6YSXUH7Wdj2Lc9LINGYmN4omigkQybS/SHM3LYV/aY0CovfNtuakKX1VJYFkGvsOZoXO2mThhtYLF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2aqFI=; 20:mJtos3mpP+/IKBKi4+nN72Dwymgb44uWtmk3VBNQKy5Wf5ebnrqzvtxH4XcyEtRY5a2/TD+IORKuWnav6OQ0pzxe8s1uFxr+mdTg7I/I8m3w8goOAPqhO1jT5F4AmJ4zl15dr+dJqN2+/YChyiKhQgG0wwzmp81iNGBCNUFYw67pYfXFr7HQhQtEe9Yf6LR1sxRLjkxIL1WNgTum9b6lyWcolwsBX1dFBxI9DLGMmizupjEy5hWCFRpAhJ0ML8PDN9Qo4vsh1E8FlFFXzkzS+xw8u9QhB2fC1854CSh6MzFJ/QF91UPD/H8ATGH0ZcfOk8JXAEjbQw6c3daN5GiDFXoDA0bm/QivkUY1wxHBbieLUQGZUOGLqkmVI4bMNBPBALEUIIegSiwV0lXu6PP2IRl0Kx74AY1Xd58oPxg/1zPOJ37tVx6FBPvL99NwxXaHN9wrI+hEwire41UcHeIxTqV0JIZb5t5EYKNq0qYZs1iechqiqgZMfzANQrzGMPGE+AhYKzKy6XIgY8pWrtrmh1+xfwxcmEfewhT0YLERgV5BefI6Nw2ICdAWeOuCEv5WRF3QjPplG8wMEjDuQ968YTqXkc7cfUnvmObzCNL2odc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:DM3PR07MB2251; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2251; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2251; 4:U7TOFaDIu04hbpiy5IUSrKkSekc4p57wu26Z4XKDrgq+pVlTntipOqaSjKgXtT562Uf8tbc8+6dUHfKlSE/ti/aCJFLbYiVCATZGVrMdcnJ1FXoDtHAPwm+yyhfqQ6P3SS8MuMe1QcsxPjAeoyUiEX/+ObECJJadvu7is23Wj2jts7khodz4MF3ClwHAxI/j9ZFybeq7T48Zao8dLqxtqS2yrEFZSbaoq/b6c9jlkFSayfO7Ig8pq2EgQEKFVvRy+4QYgN6PoG0E0dYSRo1DN9+SuKV/flOU0JXZps9pWw3UjTQipnm7jXu6UAq8Xb+7vR+9HOYZRrnnDXhSSR7KEc4VZ42BexP63WHFamdmuSV0gFL53xZ38tos2PsahFuM/iMrAbpaBp3gflvX2ko1mw== X-Forefront-PRVS: 01026E1310 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(586003)(2950100002)(6666003)(2201001)(68736007)(4001430100002)(81166006)(8676002)(229853001)(106356001)(47776003)(5001770100001)(105586002)(107886002)(33646002)(189998001)(81156014)(66066001)(50986999)(76176999)(42186005)(77096005)(97736004)(36756003)(76506005)(5003940100001)(101416001)(50226002)(7736002)(19580405001)(50466002)(305945005)(92566002)(19580395003)(7846002)(2906002)(6116002)(5660300001)(4326007)(3846002)(7416002)(48376002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR07MB2251; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR07MB2251; 23:hAKvlpxjFROyty4428SAXoqlxIKm1lgQTCRFTxr+J?= =?us-ascii?Q?sOJvWvJX8Yenfkety+XWK28wLH5M0iO7rsmAvuVkjibA0t61G795IEBj9sv3?= =?us-ascii?Q?85U4DepAaSofM9USOCAHv2IbexTjMHqORNbIYeJBaErvMjKiVsJPzZt3RlRn?= =?us-ascii?Q?k0//+fvUmZXD/sP0Gn2hV3rpGwwtntjKRj/0EuTsSCzBHwHYi8IZk48UofbN?= =?us-ascii?Q?19c2ao31CdRSvmfO/kwtvrq/6WXd1nt65oHKh2EmnBkn9tNMi4IWwipaOPWs?= =?us-ascii?Q?SihbuC1CadS92jcxpCbzF5xQKfqYpUHrteRmORzQuCCrf0BmyLeo+oCMVfmb?= =?us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put: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2016 20:34:14.0418 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2251 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161021_133436_832217_23041E7A X-CRM114-Status: UNSURE ( 6.13 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: szabolcs.nagy@arm.com, heiko.carstens@de.ibm.com, cmetcalf@ezchip.com, ynorov@caviumnetworks.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, zhouchengming1@huawei.com, Prasun.Kapoor@caviumnetworks.com, agraf@suse.de, Andrew Pinski , geert@linux-m68k.org, kilobyte@angband.pl, manuel.montezelo@gmail.com, pinskia@gmail.com, linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, bamvor.zhangjian@huawei.com, maxim.kuvyrkov@linaro.org, Nathan_Lynch@mentor.com, Andrew Pinski , schwidefsky@de.ibm.com, davem@davemloft.net, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index ab51aed..80eb000 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -42,15 +42,20 @@ 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 UTS_MACHINE := aarch64_be else KBUILD_CPPFLAGS += -mlittle-endian AS += -EL LD += -EL +LDFLAGS += -maarch64linux UTS_MACHINE := aarch64 endif