From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id 398EE7E8A for ; Wed, 8 Oct 2014 19:08:07 +0200 (CEST) Received: by mail-wi0-f181.google.com with SMTP id hi2so11213290wib.14 for ; Wed, 08 Oct 2014 10:15:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=dv0K3EdCAb0MGVUImZDjT+KFjOZ+HSh+2fpklMnYc+Y=; b=NnT0+viztDY3YbJFZPEz8wP1Mzys9hDhfE08pzCe3sTWx7Z2vlhPhvi5YidFhoXZ2l sVOwkOuN1szfxE9K+Qi7u888Z41feBWJaHgToLaXAWoCKxuqwG2gC0eEz+H3WsWgfLlr iMcSxpv6Y32DRumhLKQhKdqfk6MBzn6oKUVamK01ya63Jb5VZjzUh0JwcjrtG0WngoK8 en+OjfBB7UdYEkmysz14wz6pfs3v/+SfxUjuaGzRWb2kveXvE3v0aU6YqpbooOEfAAxx M22XkyFWI/xJag1pWsnvPkqjNlRmP0eyQNHNT6aODdSryhPHEnZNP/TP9ke4f/fDIdm3 tSuA== X-Gm-Message-State: ALoCoQmuYptgJJBCjU5Qxb+0wPlz+Ht+RpqKfXZYDahZ4V8oxjHeD60tZkzp5uQgLCjpFVdT+Lfd X-Received: by 10.180.19.66 with SMTP id c2mr12518303wie.72.1412788525170; Wed, 08 Oct 2014 10:15:25 -0700 (PDT) Received: from xps13.localnet (16.17.90.92.rev.sfr.net. [92.90.17.16]) by mx.google.com with ESMTPSA id u8sm1979416wjq.1.2014.10.08.10.15.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Oct 2014 10:15:24 -0700 (PDT) From: Thomas Monjalon To: Sergio Gonzalez Monroy Date: Wed, 08 Oct 2014 19:15:04 +0200 Message-ID: <8311103.0CSzmCek1E@xps13> Organization: 6WIND User-Agent: KMail/4.13.3 (Linux/3.15.8-1-ARCH; KDE/4.13.3; x86_64; ; ) In-Reply-To: <1412611022-8278-1-git-send-email-sergio.gonzalez.monroy@intel.com> References: <1412611022-8278-1-git-send-email-sergio.gonzalez.monroy@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Wed, 08 Oct 2014 17:08:07 -0000 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? Thanks -- Thomas