public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Abhijit Ayarekar <abhijit.ayarekar@cavium.com>
Cc: Abhijit Ayarekar <abhijit.ayarekar@caviumnetworks.com>,
	ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, yhs@fb.com
Subject: Re: [PATCH] Add -target to clang switches while cross compiling.
Date: Thu, 12 Oct 2017 16:16:17 -0700	[thread overview]
Message-ID: <20171012231615.ugya5fa4mvrze6hw@ast-mbp> (raw)
In-Reply-To: <20171012224322.GA7007@abhijit-ayarekar.cavium.com>

On Thu, Oct 12, 2017 at 03:43:22PM -0700, Abhijit Ayarekar wrote:
> On Thu, Oct 12, 2017 at 03:23:04PM -0700, Alexei Starovoitov wrote:
> > On Thu, Oct 12, 2017 at 01:45:57PM -0700, Abhijit Ayarekar wrote:
> > > Latest llvm update excludes assembly instructions.
> > > As a result __ASM_SYSREGS_H define is not required.
> > > -target switch includes appropriate target specific files.
> > > 
> > > Tested on x86 and arm64 with llvm with git revision
> > > commit df6ca162269f9d756f8742bf4b658dcf690e3eb5
> > > Author: Yonghong Song <yhs@fb.com>
> > > Date:   Thu Sep 28 02:46:11 2017 +0000
> > > 
> > >     bpf: add new insns for bswap_to_le and negation
> > > 
> > > Signed-off-by: Abhijit Ayarekar <abhijit.ayarekar@caviumnetworks.com>
> > > ---
> > >  samples/bpf/Makefile | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> > > index ebc2ad6..81f9fcd 100644
> > > --- a/samples/bpf/Makefile
> > > +++ b/samples/bpf/Makefile
> > > @@ -180,6 +180,7 @@ CLANG ?= clang
> > >  # Detect that we're cross compiling and use the cross compiler
> > >  ifdef CROSS_COMPILE
> > >  HOSTCC = $(CROSS_COMPILE)gcc
> > > +CLANG_ARCH_ARGS = -target $(ARCH)
> > 
> > this is only need because you're crosscompiling, right?
> Yes
> 
> > In native compilation it's unnecessary flag.
> > Only droping -D__ASM_SYSREG_H is enough, correct?
> > 
> Yes. That is correct.

please update commit log then and reference proper llvm commit
that added asm support instead of 'add new insns for bswap_to_le'
which is unrelated.

  reply	other threads:[~2017-10-12 23:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 20:45 [PATCH] Add -target to clang switches while cross compiling Abhijit Ayarekar
2017-10-12 22:23 ` Alexei Starovoitov
2017-10-12 22:43   ` Abhijit Ayarekar
2017-10-12 23:16     ` Alexei Starovoitov [this message]
2017-10-12 23:58       ` [PATCH] Add -target to clang switch " Abhijit Ayarekar
2017-10-13  1:14         ` Alexei Starovoitov
2017-10-13 19:24           ` Abhijit Ayarekar
2017-10-13 22:10             ` Alexei Starovoitov
2017-10-13 22:12               ` Abhijit Ayarekar
2017-10-14 23:10             ` Daniel Borkmann
2017-10-12 23:45 ` Abhijit Ayarekar

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=20171012231615.ugya5fa4mvrze6hw@ast-mbp \
    --to=alexei.starovoitov@gmail.com \
    --cc=abhijit.ayarekar@cavium.com \
    --cc=abhijit.ayarekar@caviumnetworks.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.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