Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935461AbcJUVHY (ORCPT ); Fri, 21 Oct 2016 17:07:24 -0400 Received: from mail-bl2nam02on0069.outbound.protection.outlook.com ([104.47.38.69]:13760 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932372AbcJUVHV (ORCPT ); Fri, 21 Oct 2016 17:07:21 -0400 X-Greylist: delayed 978 seconds by postgrey-1.27 at vger.kernel.org; Fri, 21 Oct 2016 17:07:21 EDT Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , Andrew Pinski , Andrew Pinski 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 Content-Type: text/plain 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/aY0CovfNtuakKX1VJYFkGvsOZoXO2mThhtYLFipoFu3Y+3YiTf9AIoy6Y7z8udgV0AuVt+ML1Da1z1TlyfB1bKa9jdagkvUBb/ifkp8NyUTsgy5PhR4w==;3:S6eMGJDZviHYwV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Fxr+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; 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-ascii?Q?07K8Wr92wpWfnOD+DyBACPSO3tHGJ5/HLhzN4QbV9KVgAcVm/rg5Klk0xzGS?= =?us-ascii?Q?RZUG8ehtUPdM+dYlMqdaDJ+v1HrCoT2Fsr9v2qGr0TKQALF9uV8mY2eyQoLd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Q9Gyv10ppy/LMO7TwQhewB++9QPSMKY0PIv0lnhiiJ1PYBSCUqrZsZRgmSEwAE6vtXDmMRsX9oweODgT3RdoaGRNK/mPXDp19/bcFFSuW5E15PqNFTddC7PRo/9K9El91zvN/rcl9z3iRNK4jj4xZARTkX73eKo3o+4QSukI96z2Hk+hjmzk7IU6WgliCXy5EgSWC32Av7vWqxE5vSAlDv7IJjQ9eszRmMA/gZJWc0Fdzr7wF1Bpx7yE3iHMBlzWQKnIq;5:6W8K3CTz+Jws5bcqJVibSZ69IyLXn5LbPnc+thwM9jAzXsXhBlcMXzoJMAoX5nG7ALWudcMA+Hwfy1IUBk6vpG3Run/FnLHYYzLRwuzNjvjxd01f1sQHwmFKIAJ0XNhRNbI7SZSY78MM7TKX9Wj57g44BUJDxgTQReHEDX5WwxU=;24:JASQpqujjVkFq9Mm+jBMVL/aPzjgFQS6vLivfaGCtHwU85QnPaJpdhweXtSu6BKzqFh6FmpnOThKxB6Hoe25SY4bJJl2HZXIhEmprYGIi3Y=;7:eNqqGKpWq0fVC7NZir3fyebNLdej3g2ehjbp0VWrS0Fgt9GJcNbL0BsHZ14GmTWlUw89Ml5zFpb9cMixqH7Jxksbj1cvZAac2q9nOqH5emE5JE5shI4ZYA4HksyMOl6ghdFR1tMWxbep/VHFul/w6V2RbsflXUQu8+7u4ODOflsQdI5pomReOumI5K/TU++2O6pRrAoC+I81osr4djGmXTjn/vE+VH4MmJ+MX4upx+lEERUsuEELcLEVV7d5YFCowjpFbPBY4kgF2gkFqvwVa3Ndeob+v3c16Urez874OlnDV35JbxaBlcW5Y6MD2+f6PwNhJW5i5fiIRFKlg0oxfOtOzfpN0X7ocUCotJG8vpE= SpamDiagnosticOutput: 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1343 Lines: 43 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 -- 2.7.4