All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergio Gonzalez Monroy <sergio.gonzalez.monroy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Bruce Richardson
	<bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH] Pass CC option when building kernel modules
Date: Thu, 9 Oct 2014 11:04:47 +0100	[thread overview]
Message-ID: <20141009100447.GD23978@sivswdev02.ir.intel.com> (raw)
In-Reply-To: <20141009081004.GA14308@BRICHA3-MOBL>

On Thu, Oct 09, 2014 at 09:10:04AM +0100, Bruce Richardson wrote:
> On Wed, Oct 08, 2014 at 07:15:04PM +0200, Thomas Monjalon wrote:
> > 2014-10-06 16:57, Sergio Gonzalez Monroy:
> > > At least on kernels 3.15 or newer, DPDK build is broken for CLANG target.
> > > The issue is that the kernel build system sets the flags before including
> > > DPDK makefile and therefore assumes the incorrect compiler.
> > > 
> > > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > 
> > > --- a/mk/rte.module.mk
> > > +++ b/mk/rte.module.mk
> > > @@ -78,7 +78,7 @@ build: _postbuild
> > >  $(MODULE).ko: $(SRCS_LINKS)
> > >  	@if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
> > >  	@$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
> > > -		CROSS_COMPILE=$(CROSS)
> > > +		CC=$(KERNELCC) CROSS_COMPILE=$(CROSS)
> > 
> > > --- a/mk/target/generic/rte.vars.mk
> > > +++ b/mk/target/generic/rte.vars.mk
> > > @@ -149,4 +149,6 @@ endif
> > >  export CFLAGS
> > >  export LDFLAGS
> > >  
> > > +else # ! ifeq ($(KERNELRELEASE),)
> > > +CC = $(KERNELCC)
> > >  endif
> > 
> > Why is it needed here? Setting CC in rte.module.mk is not sufficient?
> > 
> Right now, no it's not, and that's what is causing the error. However, we 
> maybe can look and see if we moved the definition in rte.module.mk we might 
> get the same effect.
> 

I just did a bit more testing and it seems like it is not necessary to reset
CC, CC set from the command line takes precedence.

I will post a v2 with the fix.

Thanks,
Sergio

> /Bruce
> 
> > Thanks
> > -- 
> > Thomas

  reply	other threads:[~2014-10-09 10:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 15:57 [PATCH] Pass CC option when building kernel modules Sergio Gonzalez Monroy
     [not found] ` <1412611022-8278-1-git-send-email-sergio.gonzalez.monroy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-10-06 16:12   ` Bruce Richardson
2014-10-08 17:15   ` Thomas Monjalon
2014-10-09  8:10     ` Bruce Richardson
2014-10-09 10:04       ` Sergio Gonzalez Monroy [this message]
2014-10-09 10:08   ` [PATCH v2] " Sergio Gonzalez Monroy
     [not found]     ` <1412849313-5958-1-git-send-email-sergio.gonzalez.monroy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-10-13 16:08       ` De Lara Guarch, Pablo
     [not found]         ` <E115CCD9D858EF4F90C690B0DCB4D8972262B7F2-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-10-15 14:03           ` Thomas Monjalon

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=20141009100447.GD23978@sivswdev02.ir.intel.com \
    --to=sergio.gonzalez.monroy-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.