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: 54260 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id 784FD22B1E for ; Tue, 29 Sep 2015 22:15:28 +0000 (UTC) Received: by wicgb1 with SMTP id gb1sf12853802wic.3 for ; Tue, 29 Sep 2015 15:15:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type :spamdiagnosticoutput:spamdiagnosticmetadata:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=CIVf2wrs5UZZDRIyjnZ1sZv67+IHk1EfRX9INdZaOUg=; b=XA1owPxe0n0/Mg5My29X3stXZJQgza0WS4uENypGgji8oQTGSxve8SQ2K3HnmYMiwd ZjurRidtq44RudkvOWHZJQgzBnyJlOhvZNgmU6/PD3xVUeCXQ20KrymdgyX7n+8tVXr4 MIrNhReaQ/T2HPjz6hZUc9emEcF6vouFYSI+3Mrp/v+zEWzjRySFdlxoTHEL+XUvfQ96 rfSZICyXe31hx56yCLLmSapbT9KDSUeRjIRjJWIjJa1gU5CGPJsD4nN8F/XGwTXA1f/1 Piu9EeKn29BScOvFO4An5bmUvhEATzmxpTUHSj49W08t34O8SK/Jetmu7QNi5l8lYW6Z nmEA== X-Gm-Message-State: ALoCoQlW05OS8LPp/2EFlmINjVDC9M+bciQODkbThODusHF5rIpxFMs0R8h9yaeQUXDlA9oP8fzx X-Received: by 10.195.12.234 with SMTP id et10mr45553wjd.2.1443564927777; Tue, 29 Sep 2015 15:15:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.80.140 with SMTP id e134ls6310lfb.42.gmail; Tue, 29 Sep 2015 15:15:27 -0700 (PDT) X-Received: by 10.152.228.135 with SMTP id si7mr112495lac.6.1443564927614; Tue, 29 Sep 2015 15:15:27 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id nr1si11950461lbb.3.2015.09.29.15.15.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Sep 2015 15:15:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lahh2 with SMTP id h2so25461827lah.0 for ; Tue, 29 Sep 2015 15:15:27 -0700 (PDT) X-Received: by 10.152.26.98 with SMTP id k2mr91527lag.41.1443564927496; Tue, 29 Sep 2015 15:15:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2396739lbq; Tue, 29 Sep 2015 15:15:26 -0700 (PDT) X-Received: by 10.68.193.163 with SMTP id hp3mr453269pbc.136.1443564926441; Tue, 29 Sep 2015 15:15:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i16si40520492pbq.81.2015.09.29.15.15.26; Tue, 29 Sep 2015 15:15:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755370AbbI2WPX (ORCPT + 30 others); Tue, 29 Sep 2015 18:15:23 -0400 Received: from mail-bl2on0056.outbound.protection.outlook.com ([65.55.169.56]:11137 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752314AbbI2WPP (ORCPT ); Tue, 29 Sep 2015 18:15:15 -0400 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: , , , , , CC: , , , , , Yury Norov 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?s067CTqPH7bH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A8Ph8UGhT0jXkGs?= =?us-ascii?Q?qy58ChPb8bbmr+Jdze1/bp8XZ1GATUkaLgX70L69UWQLEGSH51DnCBacSlrc?= =?us-ascii?Q?omnmlEqKZsoC4XYz5y3cLMZiT6zjuDOPxnpbkf4uZ9YcjCgwQwwi/qf442fC?= =?us-ascii?Q?FSiMROOWNF+JwMtS64I4BqeZU3Z0dKL4gSyI0NzCfEu/3ibwIW2B7I7nmLEU?= =?us-ascii?Q?vAkrwvT4mWEDULsNay884=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB624; 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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__