From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDC4BC4321D for ; Wed, 22 Aug 2018 04:17:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A4BDE214AB for ; Wed, 22 Aug 2018 04:17:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4BDE214AB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codewreck.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727312AbeHVHkH (ORCPT ); Wed, 22 Aug 2018 03:40:07 -0400 Received: from nautica.notk.org ([91.121.71.147]:43653 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbeHVHkH (ORCPT ); Wed, 22 Aug 2018 03:40:07 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id AED98C009; Wed, 22 Aug 2018 06:17:01 +0200 (CEST) Date: Wed, 22 Aug 2018 06:16:46 +0200 From: Dominique Martinet To: Nick Desaulniers Cc: joe@perches.com, Masahiro Yamada , Kees Cook , Linus Torvalds , Jonathan Corbet , Arnd Bergmann , dwmw@amazon.co.uk, LKML , Thomas Gleixner , Will Deacon , Geert Uytterhoeven , Ingo Molnar , Andrew Morton Subject: Re: [PATCH] compiler-gcc: get back Clang build Message-ID: <20180822041646.GA21716@nautica> References: <1534834088-15835-1-git-send-email-yamada.masahiro@socionext.com> <20180821123832.GA19034@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nick Desaulniers wrote on Tue, Aug 21, 2018: > On Tue, Aug 21, 2018 at 9:45 AM Joe Perches wrote: > > > Tested with gcc-7 and clang-8. > > > > clang-8? Isn't the latest officlal clang 6.0.1 ? > [...] > > So if something other than 6.0.x is required, > > then some additional check should probably be > > added to compiler-clang.h as well. > > Sure, but that doesn't need to go in Mashiro's patch today. That can > wait for a proper separation between compiler headers where we can > then implement improved version checks. I can confirm that the patch here works for me with clang 6.0.1 as far as bpf programs are concerned (and gcc 8.1.1 for the kernel build itself on x86 while I was at it); so at least there is nothing on the compiler*.h headers that put off clang 6.0.1 (also replying to other subthread) >From Joe Perches @ 2018-08-21 17:22 UTC: > The question remains, if clang can't compile > v4.17, why does it immediately matter for v4.19? I haven't had any problem with clang and 4.17 as far as building bpf programs is concerned, because the CC_HAVE_ASM_GOTO check is done in makefiles that aren't used in the bpf case and not in compiler-gcc.h or another header. So I guess the "immediately matters for v4.19" depends on how much you would care about bcc-compiled BPF programs. > Why wouldn't overriding the clang __GNUC_ > #defines in compiler-gcc.h work acceptably with > adding whatever is necessary to compiler-clang.h? I think that could work, but at the point making a separate compiler-common.h and not including compiler-gcc.h for clang sounds better to me... More importantly here, either solution sound complex enough to require more than a few days and proper testing for all archs etc when compared to the partial revert we have here. -- Dominique Martinet