From 8ccb2295050ffbc1df55767ab11bd9c2cfcb21e5 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Tue, 6 Apr 2021 08:08:53 -0700 Subject: [PATCH] qcacld-3.0: Kbuild: Update WLAN_CFG_OVERRIDE handling Currently Kbuild handles WLAN_CONFIG_OVERRIDE directives by writing the overrides into a file and then including the file. This violates one of the requirements of the Hermetic Build feature which forbids modifying the source directory. This is also subject to a race condition where multiple concurrent builds attempt to write to the file in parallel, and one of the builds ends up consuming the overrides from both builds. To avoid these issues update the WLAN_CFG_OVERRIDE handling to no longer use a file, but to instead just $(eval) the overrides. Change-Id: Iac159228a82b0a8134e272ce63ed568050e8e6ae CRs-Fixed: 2917351 --- Kbuild | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Kbuild b/Kbuild index f252cf2e4f..c83b045adf 100644 --- a/Kbuild +++ b/Kbuild @@ -36,16 +36,9 @@ endif include $(WLAN_ROOT)/configs/$(CONFIG_QCA_CLD_WLAN_PROFILE)_defconfig # add configurations in WLAN_CFG_OVERRIDE -ifneq ($(WLAN_CFG_OVERRIDE),) -WLAN_CFG_OVERRIDE_FILE := $(WLAN_ROOT)/.wlan_cfg_override -$(shell echo > $(WLAN_CFG_OVERRIDE_FILE)) - $(foreach cfg, $(WLAN_CFG_OVERRIDE), \ - $(shell echo $(cfg) >> $(WLAN_CFG_OVERRIDE_FILE))) - -include $(WLAN_CFG_OVERRIDE_FILE) -$(warning "Overriding WLAN config with: $(shell cat $(WLAN_CFG_OVERRIDE_FILE))") -endif + $(eval $(cfg)) \ + $(warning "Overriding WLAN config with: $(cfg)")) # This is temp change until connection manager changes for LFR2 are done. # Once LFR2 changes are done, CONFIG_CM_ENABLE will be removed and all