From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 24D5D68CE for ; Thu, 9 Oct 2014 10:02:48 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 09 Oct 2014 01:07:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,683,1406617200"; d="scan'208";a="615657540" Received: from bricha3-mobl.ger.corp.intel.com (HELO bricha3-mobl.ir.intel.com) ([10.243.20.24]) by orsmga002.jf.intel.com with SMTP; 09 Oct 2014 01:10:05 -0700 Received: by bricha3-mobl.ir.intel.com (sSMTP sendmail emulation); Thu, 09 Oct 2014 09:10:04 +0001 Date: Thu, 9 Oct 2014 09:10:04 +0100 From: Bruce Richardson To: Thomas Monjalon Message-ID: <20141009081004.GA14308@BRICHA3-MOBL> References: <1412611022-8278-1-git-send-email-sergio.gonzalez.monroy@intel.com> <8311103.0CSzmCek1E@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8311103.0CSzmCek1E@xps13> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.22 (2013-10-16) 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 08:02:49 -0000 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. /Bruce > Thanks > -- > Thomas