summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-09-24 09:16:09 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-09-24 09:17:36 +0200
commit597b069775efd9c0c87de93c71d8914757f29ce9 (patch)
treefc0f8a30bc5c51ca2a600eebbbe118b7335b1ccb
parent0893dc785990ceb793c08b38b7c558c59b8194b9 (diff)
backports: use := assignment for subdir-ccflags-y using cc-option
In newer kernels, calling cc-option will use KBUILD_CFLAGS, which itself gets subdir-ccflags-y added to it. Thus, we get it referencing itself, since nothing here is evaluated until KBUILD_CFLAGS is used: KBUILD_CFLAGS contains subdir-ccflags-y, that in turn contains cc-option call, containing KBUILD_CFLAGS. To avoid that, use := assignment to subdir-ccflags-y, meaning the cc-option call is done right away and we don't end up with KBUILD_CFLAGS referencing itself. Note that this is the first assignment to subdir-ccflags-y, so the += was never necessary. This fixes build of the driver on kernels 4.15 and higher. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--backport/Makefile.kernel2
1 files changed, 1 insertions, 1 deletions
diff --git a/backport/Makefile.kernel b/backport/Makefile.kernel
index a8aad0b1..cfeb3a37 100644
--- a/backport/Makefile.kernel
+++ b/backport/Makefile.kernel
@@ -30,7 +30,7 @@ NOSTDINC_FLAGS := \
$(CFLAGS)
endif
-subdir-ccflags-y += $(call cc-option, -fno-pie) $(call cc-option, -no-pie)
+subdir-ccflags-y := $(call cc-option, -fno-pie) $(call cc-option, -no-pie)
ifeq ($(CPTCFG_KERNEL_4_3),y)
subdir-ccflags-y += -Wno-pointer-sign
endif