From 597b069775efd9c0c87de93c71d8914757f29ce9 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 24 Sep 2018 09:16:09 +0200 Subject: 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 --- backport/Makefile.kernel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3