diff --git a/linux/linux.mk b/linux/linux.mk index b90b032bb9..20c268b2f7 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -160,7 +160,8 @@ endif # Get the real Linux version, which tells us where kernel modules are # going to be installed in the target filesystem. -LINUX_VERSION_PROBED = `$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease 2>/dev/null` +# Filter out 'w' from MAKEFLAGS, to workaround a bug in make 4.1 (#13141) +LINUX_VERSION_PROBED = `MAKEFLAGS='$(filter-out w,$(MAKEFLAGS))' $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease 2>/dev/null` LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME))