From patchwork Tue Sep 29 22:13:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7290961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 228539F39B for ; Tue, 29 Sep 2015 22:24:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41F32205FE for ; Tue, 29 Sep 2015 22:24:24 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 513ED20604 for ; Tue, 29 Sep 2015 22:24:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zh3IP-0007sV-3X; Tue, 29 Sep 2015 22:22:49 +0000 Received: from mail-bn1bon0095.outbound.protection.outlook.com ([157.56.111.95] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zh3Cx-0002vb-2O for linux-arm-kernel@lists.infradead.org; Tue, 29 Sep 2015 22:17:11 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (91.78.158.8) by DM2PR07MB624.namprd07.prod.outlook.com (10.141.177.154) with Microsoft SMTP Server (TLS) id 15.1.280.20; Tue, 29 Sep 2015 22:15:13 +0000 From: Yury Norov To: , , , , , Subject: [PATCH v5 02/23] arm64: ensure the kernel is compiled for LP64 Date: Wed, 30 Sep 2015 01:13:59 +0300 Message-ID: <1443564860-31208-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443564860-31208-1-git-send-email-ynorov@caviumnetworks.com> References: <1443564860-31208-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [91.78.158.8] X-ClientProxiedBy: DB5PR02CA0029.eurprd02.prod.outlook.com (25.161.237.39) To DM2PR07MB624.namprd07.prod.outlook.com (10.141.177.154) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 2:SYApKBITVSyUulg9sanixqb9B/Z3dDFbAr1I958rWLIts7OQDxirPpCqzT8MxUcVj+NKMc6hT6fLRs3Sz8M0rsNcLJfcynjT/jDmWY2PeXaZaN/reQ7/Hr8QwR9UjJNUnv9b6i4PXaadsSSDow9y5V/GKyjC/1QhycJGTcWiouc=; 3:XcmwzvCAy408TeFODwSXet86aNutWgh207hwMjGnGLTa2xeATn3JtMi0wUIG2dYz2hiYl3ec2Fy58cx7ORaxFaVbKe69KQfDJkmBsiXAqXTlZ7uk6mKZ4Op+yVMy5DPYzxfSfJAjuch2Retr6azI/g==; 25:KGprVEV94psVL9UO178wGindJuS0j7ZFT41J4kaclg1tUb3uXzk4ZXF4w+Clu1XtfBHeSJEi0CS3v6c1wHmk6aDKwMVRdIuBYbsOSDfsvzayh2YOhTelu2aB3awgdMt92gqrV+841J+aSEtr8lblUJ6kxPhHvn6M+sYmJbhDMx9wZYDdcMGVkUk0dX1bpfjhV8mgUpVjVBB9i4+9j/TjwYtxug6oL3VtWH/vi6Y1Tw2guLbbtEncyegowKdAc9shz/bpD29r9CAYMqiLBURbNg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB624; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 20:rmJfnnpjDbLG21/MHV9lN1Bg8lAgLbP04s3EfjFtAYrTUdHKtYpaTZYLq+Ws0HDu4PkU8Cg5Q5gGN2Gw4rFOmuNNPKGd15NaFGTTrgS70I/Mx5KBDl8v52PdFsSHf9zkBUEY5zV9ge9ykjERfJwtrDywR9vfgHqHDWVaCrUuNZbsh5UwmHwLOI2S9is6J4KXfP5WnHbjdyUbvs7d/As8QCyQL214KW/eGg9xwLb9qUD65t7L5l0Orp7pIEEJOjRHihVDNDErXfn9GbQ9wPKIzg5RlfnThOhdV1c2fzehnj85lIpCjRTMZvHCLQXzjyCJK1ebLzafj6LrIgxm1/6kHLsjbLzk+4QHpKdECpMQQeOobiIDQcf6omfj6QDUythjfrI2FeFGNKFAHT4JXZ1yGFSKUV3kf/ax92dEidN+h7CsAgVC4NFXWzO5AEEEYt9JWX18x53h0VyCaLO5A5NwhYeK0Ag6wBlc26d8oyTiu2j+AH+Hfj96w39wxmDS93yZ+bBtQIn37p4Dzz++Qd79HYURpErCJsZvTlH1e1Ovns9LL9DxuYjh7iCKcQf2UROZeDTpFBL71nmiQW6+gL7+ZZI22Ti5eEmEXynU5rDurTE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001); SRVR:DM2PR07MB624; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB624; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 4:CxW60zprK21ix8S7iZvgx9oB/w38kZMUXnPEjs3hf6xwtdgQ8VinVHb4QawxVapl87a9YCJImqqb8JkyuRYGfMTD574/RUfDThJretJkB3gB7WtMjAU2BAoHcm4wN7I87lyfvymUS7M+US6r32PrRLKqCDxewyvafrDk888wWJcDP9ubTgfm+sLN3+jmQ91lBVahkfmqz1VHmpjtz+8bakVFUIKft0KKP7uPr2hzGil9LJtPKPX3tPWkcQVJwCE9UhkRiuQwNRYm3ACEepk/kIZwS7EADt/T8tMLYC9QObXLs0v+6NCJjz8juGUzppfMzlZhM40gtthUoKmtQLN3rIWHiQumDmTQvOFeg2nEo9A= X-Forefront-PRVS: 0714841678 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(199003)(189002)(42186005)(19580405001)(189998001)(50226001)(107886002)(87976001)(92566002)(46102003)(5004730100002)(5001960100002)(5007970100001)(97736004)(122386002)(19580395003)(101416001)(2201001)(50986999)(5001860100001)(47776003)(50466002)(76176999)(4001540100001)(48376002)(68736005)(81156007)(40100003)(5001830100001)(76506005)(5001770100001)(229853001)(36756003)(77156002)(2950100001)(77096005)(66066001)(64706001)(33646002)(105586002)(106356001)(5003940100001)(5008740100001)(62966003)(2101003)(4001430100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB624; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; DM2PR07MB624; 23:G0Q+k0knMMbBEUK2ZWjyR8O2K3julgrC4/QEfrJtrC?= =?us-ascii?Q?er73w1qPnCuUzd60Naq2m8RMnLHlxlMQ3pj6OX1QDPSy32FqlgZN2hWPWZeZ?= =?us-ascii?Q?S3vcWds0HKBvFJDXQyRso3RbbgasdvAwzZF6mrDOFUg1v1+ty23G8IV1vALi?= =?us-ascii?Q?Bi6+LWOQ75mYTh+uXISKAY1Neiv2Il0wgvAA4xil67iJOwDbn/75ylio/MPS?= =?us-ascii?Q?s067CTqPH7bHaLoBmxk/E0D3uNryqmN4yPb6BJfGVkFiAvIohkhTekydF9HP?= =?us-ascii?Q?WuVXI+6VcfDZdmVkQ75IK2yP2qNE408OFzZMy9k9vxJaJ/LXp45EHIloM+gH?= =?us-ascii?Q?EQwp9ajjGxN/MXY6tZLGgVeLiEDxL09N4yEjq6ufw7FYmC+06lMaLZ7Q/dM3?= =?us-ascii?Q?rPN5kVQDQuiSJ87lXzMVilA+ejCnMLu4HcOZwxzEg2rZGSpiBhQlsF28Dkm2?= =?us-ascii?Q?f3pRM6LqWQo0SuZNSflk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MB624; 5:y5TjlcV4/ZVqru0rpUK9hKvNOP+LEo1E8p0px2AyZXnPweQ16uvb+IgJzNhG0Oukg9J+XZZIkfzXaliH0QQH95wqE0KzNbGh8r/OH0exrdZOJUJ2TnbBavUNcHjZx0wfDTYRdQowm9xzhiFisz8AIQ==; 24:G1GN9uKtl1UG+vA/cfVF0/+8UC47D0rsYrjgRgjdB1FaRn8DCPuwOsYgEj+WibA5dcYewigX6hPNPtbQJYnN7k8jz4s9xu8EVtXqmysXIq4=; 20:+1LndZxt21yjooQRQhViM2fwiGmyUFGV+zkn/MJZ3eJpC1SitXl7g9FyjcVPz9F3GvdKDw7H57S7mYIHlTk7DA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2015 22:15:13.1198 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB624 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150929_151711_308820_FABA44D1 X-CRM114-Status: UNSURE ( 4.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) 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: yury.norov@gmail.com, klimov.linux@gmail.com, Yury Norov , apinski@cavium.com, philipp.tomsich@theobroma-systems.com, 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index f9914d7..d7a13ce 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -15,7 +15,6 @@ CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S GZFLAGS :=-9 -KBUILD_DEFCONFIG := defconfig # Check for binutils support for specific extensions lseinstr := $(call as-instr,.arch_extension lse,-DCONFIG_AS_LSE=1) @@ -29,14 +28,19 @@ endif KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr) 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 else KBUILD_CPPFLAGS += -mlittle-endian AS += -EL LD += -EL +LDFLAGS += -maarch64linux endif CHECKFLAGS += -D__aarch64__