Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3892461ima; Tue, 23 Oct 2018 13:03:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV63J4eFSoJzSQU9yHP6J1F2aNt001x9LCbg9J1/n7jQg2geUimKO4sd1f2ADwt2FTlz794vZ X-Received: by 2002:a63:1624:: with SMTP id w36-v6mr47047711pgl.409.1540324981087; Tue, 23 Oct 2018 13:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540324981; cv=none; d=google.com; s=arc-20160816; b=VNCXq1xe7YNAiMqtFUCc3F4P+movkg6TF2kilox4OESbW0w224ciajy5p7YUVJoIif 6q/km5d5ovNAQyepkt7GNCYtwjx9DIrqtGYl7sqXUHG0rNaFNMNv7g7k6F+xzbWkz8j5 LIZbsfrKYDVGZhHT/PpR85Chqgisv1a/QgJl11qsT30uRgKhqaN9Ror4fBO6/oXNs4Wg rRLmqoCGI/YoV9QJTYNqXBAUoHNKUXqzmeihWxdesQGYmXW3FpDqDd14IFcEahY3lrIp c1LcEEXBPc1o7MomSBwSEOX0cfaQ7vXNvx/m7Z4TBnU/mx1EsD5GDUenq5uxNxDiMlG4 mj9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=xJ0PsmAnSrTpRSJk5GF6S0IL3WdjlrorlnfaZbe2OTE=; b=LR4MKEt5HxGJUvWe6f99Wm1rxMcQAslG3c6KvWu0foDWZA+lLgwEHxBO0GLGla2V20 nFVyMfKv1cEzOF+oPP8Bn+jjFr9F4li4Bzqd1G7f5ilRYa/dt9HGAx6NjTPyT5V69eIX ndjRs5rL4kR61i/a97iRKVwCNtVZnhKqNNNsqG9hTyq7zGKfrXjjnMiLel5rQYKLCUzA 26ARXttje8WcoqStQNwmQp67lGJ9ciN/fmj5HPoaKzyKYAJXF/M0WWux2qIBBbxc+Rrk WBILLDkdslavUuMNzUmzv6UjwWLU7KRsJ6CkyZY0a50WYL2hu3IVPgIyxc4X5JJcC4tZ wy5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17-v6si2030855plq.339.2018.10.23.13.02.45; Tue, 23 Oct 2018 13:03:01 -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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728655AbeJXE0j (ORCPT + 99 others); Wed, 24 Oct 2018 00:26:39 -0400 Received: from terminus.zytor.com ([198.137.202.136]:50927 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725266AbeJXE0i (ORCPT ); Wed, 24 Oct 2018 00:26:38 -0400 Received: from hanvin-mobl2.amr.corp.intel.com ([134.134.139.76]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id w9NK1QrL3158719 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 23 Oct 2018 13:01:27 -0700 Subject: Re: [PATCH RFC] x86: Don't include '-Wa,-' when building with Clang To: Nick Desaulniers , namit@vmware.com Cc: Nathan Chancellor , Thomas Gleixner , mingo@redhat.com, bp@alien8.de, x86@kernel.org, LKML , Kees Cook , Masahiro Yamada References: <20181023003725.21463-1-natechancellor@gmail.com> From: "H. Peter Anvin" Message-ID: <96ffedd2-a19d-95de-45fd-3a83025dd48a@zytor.com> Date: Tue, 23 Oct 2018 13:01:22 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/23/18 11:40, Nick Desaulniers wrote: > On Mon, Oct 22, 2018 at 10:11 PM Nadav Amit wrote: >> >> at 5:37 PM, Nathan Chancellor wrote: >> >> Commit 77b0bf55bc67 ("kbuild/Makefile: Prepare for using macros in >> inline assembly code to work around asm() related GCC inlining bugs") >> added this flag to KBUILD_CFLAGS, where it works perfectly fine with >> GCC. However, when building with Clang, all of the object files compile >> fine but the build hangs indefinitely at init/main.o, right before the >> linking stage. Don't include this flag when building with Clang. >> >> The kernel builds and boots to a shell in QEMU with both GCC and Clang >> with this patch applied. >> >> Link: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FClangBuiltLinux%2Flinux%2Fissues%2F213&data=02%7C01%7Cnamit%40vmware.com%7C871daebc2ca44947d28d08d638811fb5%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636758524579997650&sdata=shuxW81QRrO3TSqbgf462wgZYdLeAKeQEdGRxmnUX30%3D&reserved=0 >> Signed-off-by: Nathan Chancellor >> --- >> >> The reason this patch is labeled RFC is while I can verify that this >> fixes the issue, I'm not entirely sure why the '-Wa,-' works for GCC >> and not Clang. I looked into what the flag means and I couldn't really >> find anything so I just assume it's taking input from stdin? The issue >> could stem from how GCC forks gas versus how Clang does it. If this >> isn't of concern and the maintainers are happy with this patch as is, >> feel free to take it. >> Perhaps someone could actually, you know, time the build and see how much -pipe actually matters, if at all? -hpa