Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751325AbdFDMBu (ORCPT ); Sun, 4 Jun 2017 08:01:50 -0400 Received: from mail-co1nam03on0057.outbound.protection.outlook.com ([104.47.40.57]:1776 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751304AbdFDMBl (ORCPT ); Sun, 4 Jun 2017 08:01:41 -0400 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=caviumnetworks.com; From: Yury Norov To: Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann 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: Sun, 4 Jun 2017 14:59:55 +0300 Message-Id: <20170604120009.342-7-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170604120009.342-1-ynorov@caviumnetworks.com> References: <20170604120009.342-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [176.59.55.28] X-ClientProxiedBy: HE1PR09CA0068.eurprd09.prod.outlook.com (10.174.50.140) To BN3PR0701MB1266.namprd07.prod.outlook.com (10.160.118.140) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PR0701MB1266: X-MS-Office365-Filtering-Correlation-Id: 448655b4-9f86-413a-d4cd-08d4ab4173f2 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BN3PR0701MB1266; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1266;3:4Hz0LGgGzXvVYoxu/kSSHnfM59stQEjfv6ZIskAAX/uw/GqKjBpSMKj/FS5KGr24RY8QvFMSb0L2PbyZC2ptZcZsuv04/rcEuwCz7EeT2JpY9tlYbzqXx29897JuTy5O5fqZqQEhB596Iu/Y20y8YtPnXG67uN+12DFmHKcoaKLfEPX9wfwR4AnFGBbW6HlR1RdZHRtf/TjOPYt3FzSECsrg64LSdPaIWpGy3PqF3qxTsLxOddBPenJTlo2eH6tBQ9fR9TMVlIf1g6HAbIfaBAmBVCuD3fCM4K6wtt6YtTjecVj4rjHadzqOqeP0Ci8OPlU2VvmDf6lbtYV86KliEg==;25:MA94ZuoyT1dJIVoiuFL3RlyRJaUw4NIUb7fxrcaWdgwElsOdEd5XN+nvUfNwIzeQd1w2ljmEnE+08LCqqhZSyCSjVoc9NXOM+CDxL35fD+yvPO+aGaspdY8Ivm23WnLrE394o4R9im3KqpOMKJ33KYjZ0djU+B7ajn3NaaQ4WPEdBwIzNKKWqVziSo72ZPqXQvbaM4kXz5soZ18OCvwiWjC8BKkdjhynIvRMJfbWubdA6143h2h5F3/PrQl1zdoMHyeY9wyoNs1w4hputjbrIDAH0cLdGxlSRl0pWYNjlsxCjl19lt9qNwYC2FVop8MwZ0WhJKbrXEF535+5A+2TTQUpMIRcWsiUwZp5GZ3O0P8ipWwyKAjtI57RVsr/t/wEeU2vqo90+OsYtSozxKEY1pvxSm80sI45+jGKKsKdq5KyzkkpkkbiBW6tOg89xy5zDkP2UKSb8uMJjt+Qj8cfeKHiK9Jw1iYwgjlc6nIRrVA= X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1266;31:TA+AtwOkpPzXIBJfZ8gS+jv4YAp4QD/nGWLjSMz5//2AIqN7DhYKnUole1kdHUf1nbjCFPALWpjt6LemPbyUEEiF/jeKOK0vqnQuW+GvqoBkBuBkyrQJKWB3XISKdyJsuAis9O8mIrnRWTGwazEJw2O5JLSWSuW0uRtFilHABHAqyiJ36Uu6hK5wboNbiL0vQseFJtqoGaeMWP7vw7DYkGwEyq6IaXAqdX8Pa75v3l4=;20:yNsUmgeYWk84okafFWMhht2djRGZDL1sPBRVu3jKAZYraTxdgK62Jn18wDFZeJt4eRzxqNo4EDbLTShlJoVGGuTI7MzAaxJdqIQhUbRdpB8IkCUWxcmVKYLvz+odcug02amEo9TNKrUNGZe/Q2ihJov7Ujt9PmNYW9IpdKWXKYK/bTRjfXOj+2l3igMtIuE0SN9YyU8szHi7dungZTc6/wercNv7ImD40mguKau3g9BPOX9c4ms3AyzGuit5+/widTVDfwskCoRuk6Bd2GOEEN4nfTyCc1rwZo+3rXmUdbMhu+AuT7hdxt21FmGbTNrlP/jPOxVxBh+j/4pRPV3Z0YGnxi9phrjKBysILmN3+GIVef9aPJR31GlmyStcc0lVgej+ckw5aGf/0Ph33gmly2V8JHbj6mIJrIjvWmOeOtUdotefo1W7wLXIEBOvq8yNzzHJuEyAT2R+AmRHORCqbjFlg4tSbZVyJW3uzol2xVzwe+QOdoeRY22d1wlQVQ1tGk/KZEcC/JH1trU92rCRuRHh9pKoSfA/hJlI/HHIk80qq48t7RrAPb6wqCeJEJ46OTHxUaEj/JV8x+kVTeMVVyNsBiJzyvSAVkCSvDMcHj4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123560025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN3PR0701MB1266;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN3PR0701MB1266; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR0701MB1266;4:q5QqzEa8+0mocZC5k4tZNsBNy9V0AL6ifFZLaynp?= =?us-ascii?Q?aPzFWe1PluJ2vPSjDckOjmzo+KZBj4Ff5V/KpLBovl2Hnd7GcMgPBb7C6p50?= =?us-ascii?Q?U1CvTS6QZqimlcl5BfBDckC4p0QvIGr3CFqnxJAIPUFitRdHD5Vf3JD6286r?= =?us-ascii?Q?IgP30u63U/vRM9v2txlajHcSUMgdavYLaeQVNtktKWkSqCPbHw75nbYXnjLn?= =?us-ascii?Q?ieGpLq2echKWI1wLi8eaGKbB8qruumkdAAMPoP/TujQec2avl2kYLO1SYAee?= =?us-ascii?Q?PBRFycM0zhtVIe+SwehJrLTHmVbDZdvIPCo7cYMpntKt1jcTGKgoVFByLFtR?= =?us-ascii?Q?/TWa+X3eZX90aEnOZLlLHY6saXJLYGuUM7QCKBkEHIQVxRsIY4udam40wJ9I?= =?us-ascii?Q?ml9ZnayjiUx3jKNrx2xHd8IRSgWm3+6PKJZ2TjekChuVgfLq0SeH6vHL9CYv?= =?us-ascii?Q?t1N50lTr+m5VOE68Hez5JxfT83tAO5PUoqBG+2zff7ilEpyb+dRwsWkzalTw?= =?us-ascii?Q?Oq37FAN0h6RZtELWS9BKUZgsGLyy7/o8nXbP/5wZDc9sWZLCqqhZEM0uMXNg?= =?us-ascii?Q?CflW+JAaemm+nED+cIFixVjDODf9evHo9/5lhcMP56pvb+ZI3vaW7f71dkhI?= =?us-ascii?Q?gZXt/Gt58h396LCYat1VLnkBi5NGwDNFaqqlESvvv0aK/hBuJy0lA+h38ueK?= =?us-ascii?Q?S4tWxoGDjOPSgaGIzHDifkoQwqc0tHzRJ6wlKJMvPrAPaQLMUX/b+qmD3tN9?= =?us-ascii?Q?m1p27WViNhUJK/ihlSeGJGRZHf8WHXUdmC/RPQnCdZT6LGrT4BEkRDk4AHG1?= =?us-ascii?Q?KS+sW0hHh6rIqeDdQ6YtzI5b9yokgY+UrnY+OGQb0ieGckKii0eCMsvrN0NZ?= =?us-ascii?Q?MMous3cXXb/ji66IK6NoFH/5imHDRE3QZ/CjdZgRzOM4xOWTGo8Y/gVZz9vA?= =?us-ascii?Q?LPlKT2wDD8zFjYUICiyAm6VaSoj+J9cOnywT6rCjLlwg4CC93N1YrJzL+Qd0?= =?us-ascii?Q?6ekf0L3w5+FM1unyEhliHlpn6yfe0xsE6cUrgzAYSMJPu++bA0iXIuctRUAr?= =?us-ascii?Q?TMTKduulWhKUmM86wtGqzbRZbFjJsB2YvDqvcqu+FrBYPpd6y4Fc5DnxFmHV?= =?us-ascii?Q?7HbL4NfAonI=3D?= X-Forefront-PRVS: 03283976A6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(39850400002)(39400400002)(39410400002)(1076002)(7416002)(50986999)(76176999)(72206003)(2906002)(305945005)(189998001)(478600001)(47776003)(5003940100001)(5660300001)(6666003)(6496005)(2950100002)(42882006)(42186005)(53936002)(6486002)(38730400002)(107886003)(33646002)(54906002)(76506005)(48376002)(4326008)(8676002)(25786009)(81166006)(36756003)(50466002)(66066001)(6116002)(3846002)(50226002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR0701MB1266;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR0701MB1266;23:dy7bbshqaB+rIX0ZSqmXZ3ulcitwoAU6TOBRUqp?= =?us-ascii?Q?3330jrvYyV6ufAOJUEooJBBXszBWPlFXXY0PnVFNc1qKxOmb/PxYs58jmL0y?= =?us-ascii?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0LpXwyOBrpNbDmYZzGuaVMrEs4uUaPQZngfHOdhRNrGR5vOCfXW1wytYXdUYAtbBIS0QROlkv1z8878SuBLIAuvk/Mpw+R2IzojDsymRw9rCfFd71TL1B8GBvvePlxpwF+l7GIS;24:1ffkRE4HkSG+H+6l8kjlTVjWQZCTutj9buWI0wBCMSecqII/B8ZKl6V7RwVeV2YEHvwRn3Bb2JAOkxHzrgxHUtNvNV5CvOV6eGlfcf6EMmY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1266;7:nHp4FCyvcwYne3gk3FyiUP8l7kBksSmpDChTuN02uVlgeB7jcgDOimaj84bfsW622CwaB0EKrgW/uR7/gKKMQh2veUYnDPo0jaOXBRaWaWCW+H62oOKTliKOmanw0pvBZpV0kRzxYD0hKckukfaK3MLzPbaiLPf7y6o0/78CVb3gZo9iY0owIZ8lA9Y7AdetiOnddEMaDZ60yhmN4Z6S/tAFKSIsQuw1pjus/ru/fTX6yTpwekD5dQCzz39bG2qU2pfqaaVPkt7mb8JYq1J3A3frue5z82csOmGVPFlSZnQwXACd/L2kqT3/sRILcmuWPedLihsNQe3GH4EfRD2vDg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2017 12:01:36.7913 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1266 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1371 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 f839ecd919f9..5ddfb3140f7a 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -50,15 +50,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.11.0