Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753353AbdCATkp (ORCPT ); Wed, 1 Mar 2017 14:40:45 -0500 Received: from mail-by2nam03on0049.outbound.protection.outlook.com ([104.47.42.49]:11306 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752078AbdCATjl (ORCPT ); Wed, 1 Mar 2017 14:39:41 -0500 Authentication-Results: lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=none action=none header.from=caviumnetworks.com; From: Yury Norov To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann , Catalin Marinas Cc: Yury Norov , Andrew Pinski , Andrew Pinski , Adam Borowski , Chris Metcalf , Steve Ellcey , Maxim Kuvyrkov , Ramana Radhakrishnan , Florian Weimer , Bamvor Zhangjian , Andreas Schwab , Chris Metcalf , Heiko Carstens , schwidefsky@de.ibm.com, broonie@kernel.org, Joseph Myers , christoph.muellner@theobroma-systems.com, szabolcs.nagy@arm.com, klimov.linux@gmail.com, Nathan_Lynch@mentor.com, agraf@suse.de, Prasun.Kapoor@caviumnetworks.com, geert@linux-m68k.org, philipp.tomsich@theobroma-systems.com, manuel.montezelo@gmail.com, linyongting@huawei.com, davem@davemloft.net, zhouchengming1@huawei.com, Andrew Pinski Subject: [PATCH 06/20] arm64: ensure the kernel is compiled for LP64 Date: Thu, 2 Mar 2017 00:49:14 +0530 Message-Id: <1488395968-14313-7-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488395968-14313-1-git-send-email-ynorov@caviumnetworks.com> References: <1488395968-14313-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [27.97.135.110] X-ClientProxiedBy: VI1P194CA0007.EURP194.PROD.OUTLOOK.COM (10.175.178.17) To DM3PR07MB2252.namprd07.prod.outlook.com (10.164.33.150) X-MS-Office365-Filtering-Correlation-Id: a8e9b55b-472d-4b8e-2837-08d460d81425 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM3PR07MB2252; X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2252;3:+vIkvnVYRmA5QfBXhj64sgnHjrsOsDalwOE+DsqMeOnrVw5Q6qKEzUFyDTHRs/Z5Ddm0cfQHrzi13O/0PYb2SyMzNiKv48JcMYFclTgpwWzUhH3A9Gwqmj4mTckkGzKo4LP9/Qy+8jKWWvnri8tXFyAYBVk88dc+LKbNmc3z56wtshdsnLv+4zfxK9uoB/42efofXd4+uURqONALo6ZRwvv7yKRE1pmmQx/jfbXkp4YRUxn8bRL1x0sjK+wwCzQAQBm3F4zQaSxCqK4fLVkh7A==;25:TwKD43XNCb1c1lcBg5/8yjUqhq4SGPqrYZEicMkQJfMA2ddJa0jjWmilZhK4FsX1CKLaPWLj1Qx4rTxAmuGLmZag6mV8FxOoMu2WL/ncFih70Ba78IyUbtp4lL16P9350tVO9SmBsMDIr5n3/EJ4Y5u9CwdiXCYgVozLoimCxh2CL+NhS3bmcywTKltrwADJ/KKlvSgl3f6TDop3G+kczHd1UiYyp90GfsM6nZBvnQJXC3ndfqGZyrAEHjYeEshquJFFehtG1uL4ryZRZE2TH3Vqix0dxsO5p4EnKnX/m483BXlM3Mv7dkhcActOHOQhi2gcOt1WMdviF5+pjCf3mjyo/iIosv6X04bRPGKU4s3hyrkIznllKQrA9BuxdukIkGVldCDgXFqB97axPxrZsfcrnCJqu9jajnxotu4bubPq8r6V/A1Q+QZli38Gi4gHOf62p63zAhBN5OCpjUT4cQ== X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2252;31:7d5yzKheJKyY1yLjDrxFtGtpMfkYmLZ2gsCl0vsB+2MAJj2YykKWhNyg0IxYBxNgVvUse2NZJedKwQS93lwIIIF2urPAIfGq7m5S71yZS6W44NKVxIHW0MyMWP/pTSFkErcJvapvvnyycxKgLpwB5aeBOcCjts8Ldq9GiD4GIFMjDYJJ9KttDlB8BIM6Gr8xk0P9K1AHPTfMOU0miXdXAnF0AVr7blw1C2Srkb4XgeQ=;20:xkUtRc9Cf6BE9VP8dgG0ANEF4XTOYM0pXpGHp9dOEytxdcVrKY+9pC6NjcJuNYxHYhzTowT5UkDoJa1LTfyvH3bwuAvDCKmOpsWBnr+Ev+O6390xsWOGJEIMGjlhDVaC4WEALfCeeQeyGctqpoNsanmqmtDlZlRrl8520hEG3+HNVqP2r/PpDI0OxmQIwmd9Sq2oXt4rTmD92/4ylOPQTWNltgo6ESawJTghtV3pDxOqpTIvNPuolsnDPFi+7zpKeuzxKjb64Cm9vPpLvar5LrN6zrLV74VdX97asMG+Ooa5fbwtT7OxwJT+kDqrQ7qGlnMxlDMbly5rXPRfgopLcqymgofb94up9smvRtOzMeTQCHOJNja7AkUtbpF5Pew+qyLlUQgfqFy8P/F7mp7zZmJ0YdB/lqrt17BSfYcPZ5oDQt/6mgtLx59aG1anYyr83I+8S0LqtUtT0OtXmo36O6a7do/QyDkQ8GTkHc9JziKziAYMfFeWhafRYk+yEPYheZvf9z/GLfhAR2KE0MRQ7mRRFwtVgQNjUXCuBSmqS2imq9d2e2s7d7QaXOWmoB3XiK5iRQxDpICypDsYWjj5F7ivMOFdxKFZy0Dtq69wa/8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(20161123558025)(20161123562025)(20161123560025)(6072148);SRVR:DM3PR07MB2252;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2252; X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2252;4:SuBM6Q6qBGdCiPhBtrCDUQC/E0Yb0x6MmD1N8vxPdJnAKIP2iN37kzwxfeiqnkUlsGOE3euxdsSmCZJM1fW1woy1ttCS+f7HYOruuucChLStTOo6+J+V4Akz+SnNuBukzwCY+9KS+HXQXlFCgUM2DCz5iXJiys9+0YIiMxhz8bh3hyJopazvZiQhDOMqk5PYzybyvMPq8/XtM4OBeLdhmI8diiYinpXx4cJrnUQ5Rqa53P96I7VHh/8SaLlscBCHZF/Mrq6WU4wI3ZcggRrilBtVyb/JRBSCQgGBR7CH6QGjZUesQccGbehwKbtTuR1qb4nAkXswoYz3O7nX+Ee7PE18CRfAMsM7Amg1+CisAwfU062LmD9HwzFaXfILFwBt8gkQHSLtbNCEvpRqfQxQ45To0EL4QFTqYR6Ja1WCSrLhGxj084Jw/Ud2XsPF+iKJOo4Q2h1uTuSPpOciN6Sf48zFWhJKl/SdmUX/nP6BOZZAwfSE0/izghqVJc1GM6B/4nUO1eul0mseQvMsFSkbHSGMCEhfuVNDdT4F07reVY2aZeRIF8RddNStzIip1vbZLPHJVTIrhK9cZWuOBbsJ7AI+5zgM9wb8U2Z3mSUFHLQ= X-Forefront-PRVS: 0233768B38 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(50986999)(53936002)(42186005)(36756003)(5003940100001)(5660300001)(4326008)(3846002)(76176999)(48376002)(50466002)(8676002)(81166006)(50226002)(2906002)(6116002)(5009440100003)(6496005)(76506005)(47776003)(33646002)(66066001)(107886003)(54906002)(7736002)(6666003)(25786008)(92566002)(305945005)(38730400002)(7416002)(189998001)(6486002)(2950100002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM3PR07MB2252;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM3PR07MB2252;23:YoCXc8XhgQKZnUUvvDD1PtFiDQlBoV431FOtcPyv8?= =?us-ascii?Q?WPP1ilr9Z+9RJox60yHoegJPNY+iuFzGibgyIcFNVzZEfRWKgjb5WlJK2XSe?= =?us-ascii?Q?bzyLVdGaVMI113Fnc+LbnM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Kmacb?= =?us-ascii?Q?B0=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2252;6:epJcqquzAIdy6k6kUSWd46MJgDDM4tXGTd67TLiwliw4+3LfpNHYSDtz93qhFMy6OOqtQSfvbg/T2O6U9cUK9OU+roH95aFD9x2aoXOGWUzoh2VokQSD+jvghVBcsG1qxvnW+fo8Whbw0DjJmcuA8ingA09+0HYudsnY5xvOHZaeIPAUh0OD1Q3pUDDs9+waFI38yvxZLidDyzEq7lhKzDUT6Pe5i6a11lNl2sMijs4E58YKYnR4XAnIXgqm/If8vad7O+9T20TZPKJlLTv5o1iVt2ZpVlR+9hm3+bTRoW3CDAxu4jp33p8lxbJBxPxQ2S9tUT6fa7CR0l58yuLKjQlALtYHhwZhBsgHnQY6r34LBC7unI2Q0h/vL8QxoF0HX03vbcYecCiYymH29s9pyw==;5:j68Tx9i3n8erRpotACWD/jHR8/d8ZZ+X4mPpCGHrmi/gLK+1hrEObouSr1RMMdvmKccEDpK6i4pnH9RRuo/oonNogH9EIn8P7pyj8OePiy5wPADESwfkurIU4P0DgY99GT2EQOurtm6dIe2dcUwIrAPAZE/ijIFXMqIaD/D0KNg=;24:mT8WGE4el2M8rQVhxCaetSfkVwhYJdB9A4Ju7y3LRcgYJme0wsl7XTSampd73kLEJeGItOoztG7db6jE4g6qCbKaNnnVtx1PTso6pWJzKAA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2252;7:+oO1PHMvw4Hlizn36ggFYrEW86Pkvseg8QYE57Iv3JnfOSiTqoaqCYq2noh2mL5BCDsOJMH/9gBEpA7geu4SVun6a1H/qs64MLyzQCEVVt2iXlPIAmU+Vm6j3hViB0WWWYpO5JMGKWvhrGSSUfxF35c/2AEue3ubNX6Th5ffd17LvVSBDwXoKejYE9o6Ot48rbJCUQiSOKWzrmR8IFsL3VR1yBRIiTFfoD0xLq5mKw1tBHkbFhLgchUoXfTy8PLZAAkGdHY0qA2KeUYTUZyuK8wZeic2pZ2IusfLnzcztT0b9dp+uf1DYp7cpJ2dIYqZXQ/2OHH5+ax3/K71BYH7Fw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2017 19:20:52.4357 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2252 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1360 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 b9a4a93..c89734d 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -48,15 +48,20 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads) KBUILD_AFLAGS += $(lseinstr) $(brokengasinst) +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