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 490E36934 for ; Mon, 13 Oct 2014 18:01:48 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 13 Oct 2014 09:08:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,711,1406617200"; d="scan'208";a="617811852" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga002.jf.intel.com with ESMTP; 13 Oct 2014 09:08:22 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.21]) by IRSMSX101.ger.corp.intel.com ([169.254.1.201]) with mapi id 14.03.0195.001; Mon, 13 Oct 2014 17:08:22 +0100 From: "De Lara Guarch, Pablo" To: "Gonzalez Monroy, Sergio" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] Pass CC option when building kernel modules Thread-Index: AQHP46kLwK9au6Hfw0WIyn1b8JOTpZwuODqQ Date: Mon, 13 Oct 2014 16:08:21 +0000 Message-ID: References: <1412611022-8278-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1412849313-5958-1-git-send-email-sergio.gonzalez.monroy@intel.com> In-Reply-To: <1412849313-5958-1-git-send-email-sergio.gonzalez.monroy@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] 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: Mon, 13 Oct 2014 16:01:48 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergio Gonzalez > Monroy > Sent: Thursday, October 09, 2014 11:09 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2] Pass CC option when building kernel > modules >=20 > At least on kernels 3.15 or newer, wrong compiler flags are set when buil= ding > kernel modules. >=20 > v2: > Remove unnecessary reset of CC when being included from the kernel. >=20 > Signed-off-by: Sergio Gonzalez Monroy > Acked-by: Pablo de Lara > --- > mk/rte.module.mk | 2 +- > mk/toolchain/clang/rte.vars.mk | 5 +---- > mk/toolchain/gcc/rte.vars.mk | 1 + > mk/toolchain/icc/rte.vars.mk | 5 +---- > 4 files changed, 4 insertions(+), 9 deletions(-) >=20 > diff --git a/mk/rte.module.mk b/mk/rte.module.mk > index c4ca3fd..41c0d0f 100644 > --- 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=3D$(CURDIR) > O=3D$(RTE_KERNELDIR) \ > - CROSS_COMPILE=3D$(CROSS) > + CC=3D$(KERNELCC) CROSS_COMPILE=3D$(CROSS) >=20 > # install module in $(RTE_OUTPUT)/kmod > $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko > diff --git a/mk/toolchain/clang/rte.vars.mk b/mk/toolchain/clang/rte.vars= .mk > index ee4f451..40cb389 100644 > --- a/mk/toolchain/clang/rte.vars.mk > +++ b/mk/toolchain/clang/rte.vars.mk > @@ -38,11 +38,8 @@ > # - define TOOLCHAIN_ASFLAGS variable (overriden by cmdline value) > # >=20 > -ifeq ($(KERNELRELEASE),) > CC =3D $(CROSS)clang > -else > -CC =3D $(CROSS)gcc > -endif > +KERNELCC =3D $(CROSS)gcc > CPP =3D $(CROSS)cpp > # for now, we don't use as but nasm. > # AS =3D $(CROSS)as > diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk > index 262ebdf..993eb26 100644 > --- a/mk/toolchain/gcc/rte.vars.mk > +++ b/mk/toolchain/gcc/rte.vars.mk > @@ -39,6 +39,7 @@ > # >=20 > CC =3D $(CROSS)gcc > +KERNELCC =3D $(CROSS)gcc > CPP =3D $(CROSS)cpp > # for now, we don't use as but nasm. > # AS =3D $(CROSS)as > diff --git a/mk/toolchain/icc/rte.vars.mk b/mk/toolchain/icc/rte.vars.mk > index 612370d..f03a2a2 100644 > --- a/mk/toolchain/icc/rte.vars.mk > +++ b/mk/toolchain/icc/rte.vars.mk > @@ -41,11 +41,8 @@ > # Warning: we do not use CROSS environment variable as icc is mainly a > # x86->x86 compiler >=20 > -ifeq ($(KERNELRELEASE),) > CC =3D icc > -else > -CC =3D gcc > -endif > +KERNELCC =3D gcc > CPP =3D cpp > AS =3D nasm > AR =3D ar > -- > 1.9.3