Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753794AbdFSPwL (ORCPT ); Mon, 19 Jun 2017 11:52:11 -0400 Received: from mail-by2nam03on0055.outbound.protection.outlook.com ([104.47.42.55]:63419 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750979AbdFSPvr (ORCPT ); Mon, 19 Jun 2017 11:51:47 -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 , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Yury Norov , Adam Borowski , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Chris Metcalf , Florian Weimer , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Maxim Kuvyrkov , Nathan_Lynch@mentor.com, Prasun.Kapoor@caviumnetworks.com, Ramana Radhakrishnan , Steve Ellcey , Alexander Graf , Mark Brown , christoph.muellner@theobroma-systems.com, davem@davemloft.net, Geert Uytterhoeven , Alexey Klimov , linyongting@huawei.com, manuel.montezelo@gmail.com, philipp.tomsich@theobroma-systems.com, schwidefsky@de.ibm.com, szabolcs.nagy@arm.com, zhouchengming1@huawei.com, Andrew Pinski , Andrew Pinski Subject: [PATCH 06/20] arm64: ensure the kernel is compiled for LP64 Date: Mon, 19 Jun 2017 18:49:49 +0300 Message-Id: <20170619155003.13218-7-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619155003.13218-1-ynorov@caviumnetworks.com> References: <20170619155003.13218-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [85.253.137.34] X-ClientProxiedBy: VI1P190CA0031.EURP190.PROD.OUTLOOK.COM (10.165.188.172) To BY1PR0701MB1863.namprd07.prod.outlook.com (10.162.143.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ba098827-8f8f-41d2-c18e-08d4b72b10c3 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BY1PR0701MB1863; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1863;3:/zHnBop/OmjSMJmYMqJxPTCrjGfUlQ5wwgm5M1s7/WpJwnsFZNgCZDg5Nhufw4tb66My/55WKexMrJ68AnpUG3qRUQJ1NJJ5FbWMFfpVN1EQRj6znYkjiWREJ9CVIGyVb9l4jZ42ROjcSDNaT5IPD7Cp1X2a/axBEkvZpq3P+jSoa5xvlm6dgl0iiTCB0dJn8+qoAD2sMN4y/dZvKYn/UN3x7Ud07QxJm8VE4ci1sQI+0YyO6cTwHgJYVvpzV6g9enHT0f1bXmrRZMyfpTg8WYVMhyapQ13/ojeFf/rBG3KrKxRn4Mbt7AvyNt/kuxfa/1tsa/QxDu2jSyW+aWhbZQ==;25:ro4QHHiDnpUTQ5bs40H8ea87QRNVzRbMNXLHQ1QZviMuhxs3A+N/2gwR0uLGIeWB6s8fyJfC9za/AE0fTVnwosefjjlg2sQxsHTMIX0fpuY7OmA0YLOK8sYm4zNVBylfIsSA5RWQGEYScIHj/EaDzUFpp4mzwqdZew/DjHca/e+w1uGj1++QvFSshidVTUfBlS6hkho/dj2fzVaLQS+O84epRC0v24IbFxk1yCNzm5osjlE0DhxIpOEjKKSkaiBKPHwE0KjNNWC/i4cP0Tsr0ZcOH/a+vVG6PTKnephVwJbKPUGc8Pr90vxi8bxBDK+j2H4DOyixyaYIkAOvy+Ixov51l7P2OQw7V+0P0hbSOgr5lw5eS4qwzEKqOLVa2SeQfYt0a7Enp0d8Z51ZnCeaev9mzw+8uie0YN66D7We0VhInIHUBEy4bWTd94JLVoR7415h/1DkrcTWNoVA5kYEcVjwrmlQRD/ba8k5nAVPHHw= X-MS-TrafficTypeDiagnostic: BY1PR0701MB1863: X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1863;31:x2WShlbjBOjQu9d4wb3ayXyDAr9ubMZp0IbhDHRVEJY0FVLxGyY5LUi1dWiUZIGdW965dbVjw8SbAKsTqyz7Id1ogZaPhGktvs2v1TApRp4ji1s+Q/kmLhnTUV+2Ag8D+OBaVMYiicFxEW9zVNVKpR2VfFvVs58vCoHCE9/6Ji07nVMWbtMMB8IGxYD+B44mzpM++nTI31nn+RAd/t6A1W2vOcxPSYILUnjeuIH66oU=;20:yrUSll4CGPN+UgCWEUwfdwRKEZJt2AHgH4UWL4MwXWndHZqXfVewahz8E1Rk2DfsWrc9yXX3riR/GUMfQj45BjxFVyKhdI7SLCDT8v3P1gCbWFr/iQ0iR/CJk1EogAZltbcLTbqGXigpNvI9jGhS2YRZZehNJ/4ioTpuFsecfH7K1Ap3oYTrDgJrvjo1wK/WEJFDLZZ6uAswm0OcGgfKjwn8mKUlWPQaW//1zj665eKvnDO08Q7DLInRMRp5i18+xr89B4KIe2xKwOGPLFyPasE7nPiUDjSKNb6Av6yqlQ667AsIgf7OlILI2OyUxXQWwiW1/SA7vmoUpWZ8Xg3y8cDJOf8hXAld9eHWyGKsImz9+yEFbpqqzEhxVNxQnvFfmmjkcdt7/h6neRn/nUzS+xxAhN3K9xRMaNMamCZkpCI62DVLkC7IJ+KoAR/di3ktxJmpQUhJ1+0Xk5xnqbhHARiIt2ainGGopXRooLIcRrK0yh4NSo1N5Esd04c+g+uVJRhoecEuInFo6JG14mP+HdBH8t5O2/XztgcBOW3od9/HE6JijX9N3kjQgdoTZumpF+TZI8vVKpfFqoejAiCHZIMokduzbnM1WX7QB4M87/Y= 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)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY1PR0701MB1863;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY1PR0701MB1863; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0701MB1863;4:PCxbi9GrklUhji5536RyldmV+0Qrftkk3lf8SXdd?= =?us-ascii?Q?je8FaqK97liHcoWO86nVMNy6L0gdamTMuueDPuB5tUChmWX2VXby2ByWGLPN?= =?us-ascii?Q?tfi2uQUcbXB6R+dNLS9P/k0lcx5whs+rGT7/L1Z2G01R4GMt/NaXb6S8dWXq?= =?us-ascii?Q?YsAw5hPbrC/MPNJUWhMp6V4UQfL/w1qgCSj0j6cssdc0InfIa8++J0w959SN?= =?us-ascii?Q?mTOrQgnu+IjuYQ+nO/J3LYIXSaeWNzowQ+3FEJXh89dlTMLAfwubpmsR5I+U?= =?us-ascii?Q?6NyZ2ZSNoDVUU1tM+kJbqskWC11ct33VOuye1zpSflKyQhVc+NtOs9lXu+Cr?= =?us-ascii?Q?QwNCLI7SzX3AcxWb4YQnJibDSEtvx4ElcPouqd8FN0Qt1MvGXS+50dhcD96X?= =?us-ascii?Q?QPLmpHJ8FGIIXM+b54+geNV1SdIgOSZru07ECILkwNB48mn349CiFJqu+Dlc?= =?us-ascii?Q?fvMarPilar9PBlq/3wb6IP7JFh3fOcaLikOxqHDhmpVhBvCjGpJ2lMrSaguA?= =?us-ascii?Q?1SjHo59fgnsT1umHONHLp7OY9dPIouoiYWxEaAwi9SKTHMzT9SnZjtNhP+wt?= =?us-ascii?Q?B6MDEWIKtoGL35ybQY8nIjgKM1m+TANpAfXYoxjiQpGLxNXVcSHLc396LNgr?= =?us-ascii?Q?YAp30i5BJy3XHb/D3MvCgrRbEa/SwS+q4kN65nZKcHJqmEF7LSYc2INJd42I?= =?us-ascii?Q?nMqXW/IhhwLBmt6y9dUuThS7JKL4Z7XzNjiHS4yTCnVnglJJlvFAFRMegw+b?= =?us-ascii?Q?YVQcmnKhDQmSuvkSKO9E2kZ//EssfpThf/sisYXx9+jsG7mFP3sRoLBL8Dzg?= =?us-ascii?Q?lY2Jn4yfUYMGJcChI+TTVH+7AoMwai6v6BGL5bzflUWSj4trcB5QSvc1mRT+?= =?us-ascii?Q?DqHe7VCWXkdwGhmtDEN5EVczJ8wVLCyf9G18K8GHd5YhXmqqUwJeYav9Hfce?= =?us-ascii?Q?XRq9sGEVmfTi66cduj18H1qAWALw0qnmIRUUid60hVimNy6BBtZP4uje4bbP?= =?us-ascii?Q?1cNvSwtaVH5T++NwxjE7xvqQdFHHN/zXnZ67qUSdH6m7Io+E3Sfm7wqDJ2be?= =?us-ascii?Q?BqQIdGMGF+acDwD6zDOUkJpfeGoh9Fgkttf8Zo0GSxmnYGqS8K/FWI1fZc6M?= =?us-ascii?Q?5LWx5a+fec0=3D?= X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(39850400002)(53936002)(50466002)(189998001)(5660300001)(48376002)(2906002)(33646002)(107886003)(38730400002)(50986999)(76176999)(5003940100001)(6486002)(478600001)(72206003)(54906002)(2950100002)(6666003)(6496005)(47776003)(66066001)(50226002)(81166006)(25786009)(8676002)(1076002)(6116002)(3846002)(42882006)(42186005)(7736002)(7416002)(36756003)(76506005)(7406005)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1863;H:localhost;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0701MB1863;23:sOJ4mSm6yFpL1tsiFeEgVTDXOYAwxJEi05MsuX6?= =?us-ascii?Q?tu74xjnPiw5EvqaT/JkFrA86WB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J6BB4OOw77NUkHxWR0lkVa+sRBwSf2RtWXY7r/InK4Nb1bTWhZPzlPEB4658vjSBfo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1863;7:Map28l6e0qAjXCAruI6ckzBwbD7zdRFH593ZChPjDjjJp3CDLh5SRhWzgB07mz8LDFk8B1A8Xb/dpNexlkRFLs+GOvucPXUqdIQz7UuPvLX3ConPV3UQ+ateJf0CVL3frZIoWlyR6Qi88bRYf5MaxoMV6RJjXC4DcS3rHpPXFjhRAE5D8BNaiiVqfiKjxKh9plWq8vhveMEzLEUs9kzlqlptSA5qM+Tf12pok2jBb4ZGmhX5weZnH+XO3DQAZF5qxqZH4Jb3qt1nMPEl95xdDP8nSo0tnrca0A+nxGhOikoVx5qVMGR9D+DH+QL99AlGXrqW5PpbWioHbdM0vOu+Fngv8Z5WerpZ/wXgC9gHb3K1d69qf5f59I1INHKd49PBxGX8iN6xoOGPzzBxaM4vYZK//g62/hT8rgieiEhcWgzqEwJit0OrZhdVuSeN6Ozb92UgQfYCjhM6mmnu8ALow5MEjM1CD9Zjz+Pjt7szwkipyHMNwfVDGG0CXACMapi8PsnUL2vRrHGftFFdy2EDDB4riQRMDfJGw6RzPYWhbCUVhFZUa4RDB7OmA5VXJ4JR44osyQIhL3HS4oLhGivV8/Dv9CaLwERr4fH2UGtFBzuRXm/l7aeOINxH63H5Na687AAuRMcCA8p5boKoW6FbSNughLMpSa6f5A85B2OjvQblW7yx6Asaddh41DGBPm93XikYrw8cl7E53YEVCehK3+/WofXeQp5XHfhPAGsbZpOkQQEgW8excJG3Q0y5cCQs9O67yUIA0llDcIpJmPQOlNln5IQKsssEdwG/OHnI+kg= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:51:35.3979 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1863 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 1ce57b42f390..807451ffcc29 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