From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D98E66A9B for ; Thu, 9 Oct 2014 11:57:31 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 09 Oct 2014 03:04:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,683,1406617200"; d="scan'208";a="615702052" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 09 Oct 2014 03:04:49 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s99A4mwD003477; Thu, 9 Oct 2014 11:04:48 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s99A4lql005458; Thu, 9 Oct 2014 11:04:47 +0100 Received: (from smonroy@localhost) by sivswdev02.ir.intel.com with id s99A4l8N005454; Thu, 9 Oct 2014 11:04:47 +0100 Date: Thu, 9 Oct 2014 11:04:47 +0100 From: Sergio Gonzalez Monroy To: Bruce Richardson Message-ID: <20141009100447.GD23978@sivswdev02.ir.intel.com> References: <1412611022-8278-1-git-send-email-sergio.gonzalez.monroy@intel.com> <8311103.0CSzmCek1E@xps13> <20141009081004.GA14308@BRICHA3-MOBL> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141009081004.GA14308@BRICHA3-MOBL> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] Pass CC option when building kernel modules X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2014 09:57:32 -0000 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 > > > > > --- 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