mk: pass CROSS_COMPILE when compiling kernel modules
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> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
parent
396b69e56a
commit
6383201503
@ -77,7 +77,8 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user