aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Vogel <karl.vogel@gmail.com>2017-10-13 11:10:03 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2017-10-29 16:17:05 +0100
commit76378c6b9fe6aa7fcdbbc7c050ae6392b71a72b8 (patch)
treee9ccda96723ab5f40b39af552e13e13e35f29304
parent851644bf5bf0415b9937f8bf4f34c38ba7c59ccf (diff)
downloadupstream-76378c6b9fe6aa7fcdbbc7c050ae6392b71a72b8.tar.gz
upstream-76378c6b9fe6aa7fcdbbc7c050ae6392b71a72b8.tar.bz2
upstream-76378c6b9fe6aa7fcdbbc7c050ae6392b71a72b8.zip
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>
-rw-r--r--package/kernel/acx-mac80211/Makefile3
-rw-r--r--package/kernel/ar7-atm/Makefile3
-rw-r--r--package/kernel/ath10k-ct/Makefile3
-rw-r--r--package/kernel/avila-wdt/Makefile3
-rw-r--r--package/kernel/broadcom-wl/Makefile3
-rw-r--r--package/kernel/button-hotplug/Makefile3
-rw-r--r--package/kernel/gpio-button-hotplug/Makefile3
-rw-r--r--package/kernel/gpio-nct5104d/Makefile3
-rw-r--r--package/kernel/hwmon-gsc/Makefile3
-rw-r--r--package/kernel/i2c-gpio-custom/Makefile3
-rw-r--r--package/kernel/leds-apu2/Makefile3
-rw-r--r--package/kernel/mt76/Makefile3
-rw-r--r--package/kernel/mwlwifi/Makefile3
-rw-r--r--package/kernel/rotary-gpio-custom/Makefile3
-rw-r--r--package/kernel/rtc-rv5c386a/Makefile3
-rw-r--r--package/kernel/spi-gpio-custom/Makefile3
-rw-r--r--package/kernel/w1-gpio-custom/Makefile3
-rw-r--r--package/kernel/wrt55agv2-spidevs/Makefile3
-rw-r--r--package/network/utils/xtables-addons/Makefile6
-rw-r--r--toolchain/kernel-headers/Makefile8
20 files changed, 22 insertions, 46 deletions
diff --git a/package/kernel/acx-mac80211/Makefile b/package/kernel/acx-mac80211/Makefile
index a3d5de2316..adca5b742a 100644
--- a/package/kernel/acx-mac80211/Makefile
+++ b/package/kernel/acx-mac80211/Makefile
@@ -182,8 +182,7 @@ PKG_EXTRA_CFLAGS:= \
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
$(PKG_EXTRA_KCONFIG) \
EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(4,2,0)\"" \
diff --git a/package/kernel/ar7-atm/Makefile b/package/kernel/ar7-atm/Makefile
index edec44f969..82d6f61a7d 100644
--- a/package/kernel/ar7-atm/Makefile
+++ b/package/kernel/ar7-atm/Makefile
@@ -80,8 +80,7 @@ endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- ARCH="$(LINUX_KARCH)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
modules
endef
diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index 9b152dd285..82d7664b76 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -79,8 +79,7 @@ endif
define Build/Compile
+$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
diff --git a/package/kernel/avila-wdt/Makefile b/package/kernel/avila-wdt/Makefile
index 94bda9b8d5..a91c93374c 100644
--- a/package/kernel/avila-wdt/Makefile
+++ b/package/kernel/avila-wdt/Makefile
@@ -22,8 +22,7 @@ define KernelPackage/avila-wdt
endef
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)"
define Build/Compile
diff --git a/package/kernel/broadcom-wl/Makefile b/package/kernel/broadcom-wl/Makefile
index fe1c5228fa..d1d0604519 100644
--- a/package/kernel/broadcom-wl/Makefile
+++ b/package/kernel/broadcom-wl/Makefile
@@ -100,8 +100,7 @@ define Package/nas/description
endef
MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- ARCH="$(LINUX_KARCH)" \
+ $(KERNEL_MAKE_FLAGS) \
PATH="$(TARGET_PATH)" \
SUBDIRS="$(PKG_BUILD_DIR)/kmod" \
diff --git a/package/kernel/button-hotplug/Makefile b/package/kernel/button-hotplug/Makefile
index 7b6aacfbf9..2554ae61dd 100644
--- a/package/kernel/button-hotplug/Makefile
+++ b/package/kernel/button-hotplug/Makefile
@@ -36,8 +36,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
diff --git a/package/kernel/gpio-button-hotplug/Makefile b/package/kernel/gpio-button-hotplug/Makefile
index 8f836a841a..216d23b76d 100644
--- a/package/kernel/gpio-button-hotplug/Makefile
+++ b/package/kernel/gpio-button-hotplug/Makefile
@@ -33,8 +33,7 @@ define KernelPackage/gpio-button-hotplug/description
endef
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)"
define Build/Compile
diff --git a/package/kernel/gpio-nct5104d/Makefile b/package/kernel/gpio-nct5104d/Makefile
index b43291e5a4..33352388cf 100644
--- a/package/kernel/gpio-nct5104d/Makefile
+++ b/package/kernel/gpio-nct5104d/Makefile
@@ -37,8 +37,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
diff --git a/package/kernel/hwmon-gsc/Makefile b/package/kernel/hwmon-gsc/Makefile
index 1892e027ca..3888a2f17e 100644
--- a/package/kernel/hwmon-gsc/Makefile
+++ b/package/kernel/hwmon-gsc/Makefile
@@ -20,8 +20,7 @@ endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- ARCH="$(LINUX_KARCH)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
diff --git a/package/kernel/i2c-gpio-custom/Makefile b/package/kernel/i2c-gpio-custom/Makefile
index fb3f3bf17e..d1123cc3fb 100644
--- a/package/kernel/i2c-gpio-custom/Makefile
+++ b/package/kernel/i2c-gpio-custom/Makefile
@@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
diff --git a/package/kernel/leds-apu2/Makefile b/package/kernel/leds-apu2/Makefile
index bab2315b07..08aca1750f 100644
--- a/package/kernel/leds-apu2/Makefile
+++ b/package/kernel/leds-apu2/Makefile
@@ -37,8 +37,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 6214f37121..5d672034de 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -74,8 +74,7 @@ endif
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
index e28d5542f0..e1d80a8e4b 100644
--- a/package/kernel/mwlwifi/Makefile
+++ b/package/kernel/mwlwifi/Makefile
@@ -43,8 +43,7 @@ NOSTDINC_FLAGS = \
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
modules
diff --git a/package/kernel/rotary-gpio-custom/Makefile b/package/kernel/rotary-gpio-custom/Makefile
index e1cf7ff1de..f758567365 100644
--- a/package/kernel/rotary-gpio-custom/Makefile
+++ b/package/kernel/rotary-gpio-custom/Makefile
@@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
diff --git a/package/kernel/rtc-rv5c386a/Makefile b/package/kernel/rtc-rv5c386a/Makefile
index e970982070..a268ad508c 100644
--- a/package/kernel/rtc-rv5c386a/Makefile
+++ b/package/kernel/rtc-rv5c386a/Makefile
@@ -23,8 +23,7 @@ endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- ARCH="$(LINUX_KARCH)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
diff --git a/package/kernel/spi-gpio-custom/Makefile b/package/kernel/spi-gpio-custom/Makefile
index e6d692db44..19aef20ed2 100644
--- a/package/kernel/spi-gpio-custom/Makefile
+++ b/package/kernel/spi-gpio-custom/Makefile
@@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
diff --git a/package/kernel/w1-gpio-custom/Makefile b/package/kernel/w1-gpio-custom/Makefile
index 67fdc7d15e..1008cf9736 100644
--- a/package/kernel/w1-gpio-custom/Makefile
+++ b/package/kernel/w1-gpio-custom/Makefile
@@ -33,8 +33,7 @@ EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG))))
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
diff --git a/package/kernel/wrt55agv2-spidevs/Makefile b/package/kernel/wrt55agv2-spidevs/Makefile
index 169f6b4da1..d80c1e570b 100644
--- a/package/kernel/wrt55agv2-spidevs/Makefile
+++ b/package/kernel/wrt55agv2-spidevs/Makefile
@@ -25,8 +25,7 @@ define KernelPackage/wrt55agv2-spidevs/description
endef
MAKE_OPTS:= \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
SUBDIRS="$(PKG_BUILD_DIR)"
define Build/Compile
diff --git a/package/network/utils/xtables-addons/Makefile b/package/network/utils/xtables-addons/Makefile
index a1415fc18b..b1e134e0e6 100644
--- a/package/network/utils/xtables-addons/Makefile
+++ b/package/network/utils/xtables-addons/Makefile
@@ -43,8 +43,7 @@ CONFIGURE_ARGS+= \
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
DESTDIR="$(PKG_INSTALL_DIR)" \
DEPMOD="/bin/true" \
all
@@ -52,8 +51,7 @@ endef
define Build/Install
$(MAKE) -C $(PKG_BUILD_DIR) \
- ARCH="$(LINUX_KARCH)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
+ $(KERNEL_MAKE_FLAGS) \
DESTDIR="$(PKG_INSTALL_DIR)" \
DEPMOD="/bin/true" \
install
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index 1bf5598d6f..e374e706e1 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -36,13 +36,9 @@ HOST_EXTRACFLAGS=
LINUX_HAS_HEADERS_INSTALL:=y
KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \
- HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
- ARCH=$(LINUX_KARCH) \
+ $(KERNEL_MAKE_FLAGS) \
CC="$(KERNEL_CC)" \
- CFLAGS="$(TARGET_CFLAGS)" \
- CROSS_COMPILE=$(TARGET_CROSS) \
- KBUILD_HAVE_NLS=no \
- CONFIG_SHELL=$(BASH)
+ CFLAGS="$(TARGET_CFLAGS)"
define Host/Configure/all
mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev