build: use KERNEL_MAKE_FLAGS for kernel file compilations

The build system already defines KERNEL_CROSS which defaults to TARGET_CROSS.
Make use of this variable for kernel makefiles.

Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
Karl Vogel 2017-10-13 11:10:03 +02:00 committed by Hauke Mehrtens
parent 851644bf5b
commit 76378c6b9f
20 changed files with 22 additions and 46 deletions

View File

@ -182,8 +182,7 @@ PKG_EXTRA_CFLAGS:= \
define Build/Compile define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \ $(MAKE) -C "$(LINUX_DIR)" \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
$(PKG_EXTRA_KCONFIG) \ $(PKG_EXTRA_KCONFIG) \
EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(4,2,0)\"" \ EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(4,2,0)\"" \

View File

@ -80,8 +80,7 @@ endef
define Build/Compile define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \ $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \ $(KERNEL_MAKE_FLAGS) \
ARCH="$(LINUX_KARCH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
modules modules
endef endef

View File

@ -79,8 +79,7 @@ endif
define Build/Compile define Build/Compile
+$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \ +$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \ SUBDIRS="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules modules

View File

@ -22,8 +22,7 @@ define KernelPackage/avila-wdt
endef endef
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" SUBDIRS="$(PKG_BUILD_DIR)"
define Build/Compile define Build/Compile

View File

@ -100,8 +100,7 @@ define Package/nas/description
endef endef
MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \ MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \ $(KERNEL_MAKE_FLAGS) \
ARCH="$(LINUX_KARCH)" \
PATH="$(TARGET_PATH)" \ PATH="$(TARGET_PATH)" \
SUBDIRS="$(PKG_BUILD_DIR)/kmod" \ SUBDIRS="$(PKG_BUILD_DIR)/kmod" \

View File

@ -36,8 +36,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG) $(EXTRA_KCONFIG)

View File

@ -33,8 +33,7 @@ define KernelPackage/gpio-button-hotplug/description
endef endef
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" SUBDIRS="$(PKG_BUILD_DIR)"
define Build/Compile define Build/Compile

View File

@ -37,8 +37,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG) $(EXTRA_KCONFIG)

View File

@ -20,8 +20,7 @@ endef
define Build/Compile define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \ $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \ $(KERNEL_MAKE_FLAGS) \
ARCH="$(LINUX_KARCH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \ EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules modules

View File

@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG) $(EXTRA_KCONFIG)

View File

@ -37,8 +37,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG) $(EXTRA_KCONFIG)

View File

@ -74,8 +74,7 @@ endif
define Build/Compile define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules modules

View File

@ -43,8 +43,7 @@ NOSTDINC_FLAGS = \
define Build/Compile define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules modules

View File

@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG) $(EXTRA_KCONFIG)

View File

@ -23,8 +23,7 @@ endef
define Build/Compile define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \ $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \ $(KERNEL_MAKE_FLAGS) \
ARCH="$(LINUX_KARCH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \ EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules modules

View File

@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG) $(EXTRA_KCONFIG)

View File

@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG))))
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \ SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG) $(EXTRA_KCONFIG)

View File

@ -25,8 +25,7 @@ define KernelPackage/wrt55agv2-spidevs/description
endef endef
MAKE_OPTS:= \ MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" SUBDIRS="$(PKG_BUILD_DIR)"
define Build/Compile define Build/Compile

View File

@ -43,8 +43,7 @@ CONFIGURE_ARGS+= \
define Build/Compile define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
DESTDIR="$(PKG_INSTALL_DIR)" \ DESTDIR="$(PKG_INSTALL_DIR)" \
DEPMOD="/bin/true" \ DEPMOD="/bin/true" \
all all
@ -52,8 +51,7 @@ endef
define Build/Install define Build/Install
$(MAKE) -C $(PKG_BUILD_DIR) \ $(MAKE) -C $(PKG_BUILD_DIR) \
ARCH="$(LINUX_KARCH)" \ $(KERNEL_MAKE_FLAGS) \
CROSS_COMPILE="$(TARGET_CROSS)" \
DESTDIR="$(PKG_INSTALL_DIR)" \ DESTDIR="$(PKG_INSTALL_DIR)" \
DEPMOD="/bin/true" \ DEPMOD="/bin/true" \
install install

View File

@ -36,13 +36,9 @@ HOST_EXTRACFLAGS=
LINUX_HAS_HEADERS_INSTALL:=y LINUX_HAS_HEADERS_INSTALL:=y
KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \ KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \ $(KERNEL_MAKE_FLAGS) \
ARCH=$(LINUX_KARCH) \
CC="$(KERNEL_CC)" \ CC="$(KERNEL_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)"
CROSS_COMPILE=$(TARGET_CROSS) \
KBUILD_HAVE_NLS=no \
CONFIG_SHELL=$(BASH)
define Host/Configure/all define Host/Configure/all
mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev