From: Aaro Koskinen <aaro.koskinen@nsn.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] mk: pass CROSS_COMPILE when compiling kernel modules
Date: Fri, 7 Feb 2014 18:44:18 +0200 [thread overview]
Message-ID: <1391791458-17601-1-git-send-email-aaro.koskinen@nsn.com> (raw)
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 <aaro.koskinen@nsn.com>
---
mk/rte.module.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mk/rte.module.mk b/mk/rte.module.mk
index b3a630e..5d66d90 100644
--- a/mk/rte.module.mk
+++ b/mk/rte.module.mk
@@ -77,7 +77,7 @@ build: _postbuild
# build module
$(MODULE).ko: $(SRCS_LINKS)
@if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR)
+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) CROSS_COMPILE=$(CROSS)
# install module in $(RTE_OUTPUT)/kmod
$(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko
--
1.8.5.1
next reply other threads:[~2014-02-07 16:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 16:44 Aaro Koskinen [this message]
2014-02-25 21:55 ` Thomas Monjalon
2014-03-07 13:32 ` Aaro Koskinen
2014-04-17 13:38 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1391791458-17601-1-git-send-email-aaro.koskinen@nsn.com \
--to=aaro.koskinen@nsn.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).