At least on kernels 3.15 or newer, wrong compiler flags are set when building
kernel modules.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
$(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) V=$(if $V,1,0)
+ CC=$(KERNELCC) CROSS_COMPILE=$(CROSS) V=$(if $V,1,0)
# install module in $(RTE_OUTPUT)/kmod
$(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko
# - define TOOLCHAIN_ASFLAGS variable (overriden by cmdline value)
#
-ifeq ($(KERNELRELEASE),)
CC = $(CROSS)clang
-else
-CC = $(CROSS)gcc
-endif
+KERNELCC = $(CROSS)gcc
CPP = $(CROSS)cpp
# for now, we don't use as but nasm.
# AS = $(CROSS)as
#
CC = $(CROSS)gcc
+KERNELCC = $(CROSS)gcc
CPP = $(CROSS)cpp
# for now, we don't use as but nasm.
# AS = $(CROSS)as
# Warning: we do not use CROSS environment variable as icc is mainly a
# x86->x86 compiler
-ifeq ($(KERNELRELEASE),)
CC = icc
-else
-CC = gcc
-endif
+KERNELCC = gcc
CPP = cpp
AS = nasm
AR = ar