From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id A2EAF594C for ; Thu, 17 Apr 2014 15:38:07 +0200 (CEST) Received: by mail-wi0-f173.google.com with SMTP id z2so2932437wiv.0 for ; Thu, 17 Apr 2014 06:38:08 -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=vgvKpqqOwlFOLhUrzAIDjP31/gjZObublQ8OL2REndk=; b=gu+LYLvO3j3i//vlGTnjw4nSASaVpeH+PqQTL8IzSbsYcvhffWrdEEmG2YhTBdT0LM p0CiUJQeL/TSIEbkJHL04jsVd31m+RjG23Q1gyCRkV9m0w6qVeL7/8U/7Da5kA+M2+tp 6a03JRm2FfLBaszqNPAuf7mO2GhlN5WvzfbFMOiK+e3Q2xdv1JEN99UR2ou/GOMWXapg lkaKOBPQQM8lBDLkfnbZTFhMrK7OK7Mb40JWbLL0ycrlRARClU4K3JJkb4ejlICUc1Rk if5So+mZriJ9AH/wfD4RZc11AZcb/imKY4uLOZNY/zKaeuxfwjhbX8t0XjqH9fEFWxd6 fTiw== X-Gm-Message-State: ALoCoQmNmBg5w2qoc49+dO1Hid1QE03uZIVUjeQaNi2prRXCWJ15Pgax+X4c61V3aQSsMCWlvgL2 X-Received: by 10.180.210.171 with SMTP id mv11mr12395877wic.44.1397741888087; Thu, 17 Apr 2014 06:38:08 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id d6sm4953336wiz.4.2014.04.17.06.38.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Apr 2014 06:38:07 -0700 (PDT) From: Thomas Monjalon To: Aaro Koskinen Date: Thu, 17 Apr 2014 15:38:06 +0200 Message-ID: <1472845.ooNuTRJrP7@xps13> Organization: 6WIND User-Agent: KMail/4.12.4 (Linux/3.14.1-1-ARCH; KDE/4.12.4; x86_64; ; ) In-Reply-To: <20140307133226.GV15431@ak-desktop.emea.nsn-net.net> References: <1391791458-17601-1-git-send-email-aaro.koskinen@nsn.com> <2031701.DtHZU1GqtL@x220> <20140307133226.GV15431@ak-desktop.emea.nsn-net.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] mk: pass CROSS_COMPILE when compiling 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, 17 Apr 2014 13:38:08 -0000 Hi, 2014-03-07 15:32, Aaro Koskinen: > On Tue, Feb 25, 2014 at 10:55:36PM +0100, Thomas Monjalon wrote: > > 07/02/2014 18:44, Aaro Koskinen : > > > Pass CROSS_COMPILE to the kernel build system when compiling kernel > > > modules. Although we export CC etc. the top level kernel Makefile will > > > override the environment. As a result it will end up using wrong tools > > > if cross-compilation is desired but CROSS_COMPILE is not set. > > > > > > Signed-off-by: Aaro Koskinen > > > > Could you explain why it's needed ? > > In a basic test, CC=$(CROSS)gcc in rte.vars.mk seems sufficient. > > If you compile on 32-bit host to 64-bit target, the build fails with > errors such as: > > [...]include/linux/kernfs.h:331:1: note: expected 'const char *' but > argument is of type 'const unsigned char *' kernfs_find_and_get(struct > kernfs_node *kn, const char *name) > ^ > cc1: all warnings being treated as errors > > Build with V=1 shows that following appears in the command line > when compiling the kernel modules: > > -isystem /usr/lib/gcc/i486-linux-gnu/4.8/include > > With the patch this will be corrected to point to my target's sysroot: > > -isystem /foo/bar/lib/gcc/x86_64-linux-gnu/4.8.2/include > > And the build succeeds without any warnings. Acked-by: Thomas Monjalon It's applied for version 1.6.0r2. Thanks -- Thomas