linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: joe@perches.com, Masahiro Yamada <yamada.masahiro@socionext.com>,
	Kees Cook <keescook@chromium.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>, Arnd Bergmann <arnd@arndb.de>,
	dwmw@amazon.co.uk, LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will.deacon@arm.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] compiler-gcc: get back Clang build
Date: Thu, 23 Aug 2018 01:57:22 +0200	[thread overview]
Message-ID: <20180822235722.GA27485@nautica> (raw)
In-Reply-To: <CAKwvOdm+BwvDxAw-A_1v5xO2EjDff1axAttHVz5QnBSxSbKo=g@mail.gmail.com>

Nick Desaulniers wrote on Wed, Aug 22, 2018:
> I'm currently testing a fix in
> https://github.com/ClangBuiltLinux/linux/commit/1f89ae7622c26b8131f42f3a362d6ef41b88a595,
> can you please share with me your steps to test/verify that the patch
> fixes the issue for eBPF?  I'll go talk to a co-worker who know more
> about eBPF, but I've not yet done anything with it.

Thanks for the link.

The simplest way to test with bcc for me would probably be to fetch the
example from their repo itself[1], whether you install bcc through your
distro or compile it yourself.

There are dozens of example programs in the tools/ directory of which
you can just run any, if will try to compile the program embedded wihtin
the example at runtime with clang.

[1] https://github.com/iovisor/bcc

(I just noticed fedora provides a bcc-tools package which provides these
tools directly, so if you're lucky you can just install that and run
examples in /usr/share/bcc/tools)



In particular I get a couple of errors with your patch, I think it boils
down to this one:
-----
In file included from <built-in>:3:
In file included from /virtual/include/bcc/helpers.h:23:
In file included from /lib/modules/4.18.0+/build/include/linux/log2.h:16:
In file included from /lib/modules/4.18.0+/build/include/linux/bitops.h:18:
In file included from /lib/modules/4.18.0+/build/arch/x86/include/asm/bitops.h:16:
/lib/modules/4.18.0+/build/include/linux/compiler.h:217:3: error:
expected expression
                barrier();
                ^
/lib/modules/4.18.0+/build/include/linux/compiler-clang.h:43:20: note:
expanded from macro 'barrier'
#define barrier() (__asm__ __volatile__("" : : : "memory"))
                   ^
-----

And removing the parenthesis around the expression seems to work, they
weren't here in the compiler-gcc.h file in the previous version?

There might be other defines the simple examples I ran do not use but
from a quick glance it doesn't look like it, thank you for the split
work!

-- 
Dominique Martinet

  parent reply	other threads:[~2018-08-22 23:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21  6:48 [PATCH] compiler-gcc: get back Clang build Masahiro Yamada
2018-08-21  8:09 ` Nick Desaulniers
2018-08-21 10:39 ` Joe Perches
2018-08-21 16:35   ` Nick Desaulniers
2018-08-21 17:13   ` Masahiro Yamada
2018-08-21 17:20     ` Joe Perches
2018-08-21 12:38 ` Dominique Martinet
2018-08-21 16:32   ` Nick Desaulniers
2018-08-21 16:45     ` Joe Perches
2018-08-21 17:00       ` Nick Desaulniers
2018-08-22  4:16         ` Dominique Martinet
2018-08-22  4:22           ` Joe Perches
2018-08-22  4:32             ` Dominique Martinet
2018-08-22 18:31               ` Nick Desaulniers
2018-08-22 19:01                 ` Nick Desaulniers
2018-08-22 20:50                 ` Joe Perches
2018-08-22 23:05                   ` Nick Desaulniers
2018-08-22 23:32                     ` Joe Perches
2018-08-22 23:57                 ` Dominique Martinet [this message]
2018-08-21 16:33 ` Joe Perches
2018-08-21 16:57   ` Nick Desaulniers
2018-08-21 17:22     ` Joe Perches
2018-08-21 17:07   ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180822235722.GA27485@nautica \
    --to=asmadeus@codewreck.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=corbet@lwn.net \
    --cc=dwmw@amazon.co.uk \
    --cc=geert@linux-m68k.org \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).