[PATCH 1/1] build: restore missing libwpa_client.so

Sergey Matyukevich geomatsi at gmail.com
Sat Feb 19 11:25:58 PST 2022


Commit a41a29192e5d ("build: Pull common fragments into a build.rules
file") introduced regression into wpa_supplicant build process. Build
target libwpa_client.so is not built regardless of whether the option
CONFIG_BUILD_WPA_CLIENT_SO is set or not. This happens because config
option is used before it is imported from the configuration file.
Moving its usage after including build.rules does not help: variable
ALL is processed by build.rules and further changes are not applied.
This commit moves imports of hostapd/wpa_s configuration files from
build.rules back into Makefiles.

Signed-off-by: Sergey Matyukevich <geomatsi at gmail.com>
---
 hostapd/Makefile        | 7 ++++++-
 src/build.rules         | 1 -
 wpa_supplicant/Makefile | 8 +++++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/hostapd/Makefile b/hostapd/Makefile
index e37c13b27..7570d567a 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -1,6 +1,11 @@
-ALL=hostapd hostapd_cli
 CONFIG_FILE = .config
 
+ifneq ($(CONFIG_FILE),)
+-include $(CONFIG_FILE)
+endif
+
+ALL=hostapd hostapd_cli
+
 include ../src/build.rules
 
 ifdef LIBS
diff --git a/src/build.rules b/src/build.rules
index acda88472..e22f5d538 100644
--- a/src/build.rules
+++ b/src/build.rules
@@ -35,7 +35,6 @@ CFLAGS = -MMD -O2 -Wall -g
 endif
 
 ifneq ($(CONFIG_FILE),)
--include $(CONFIG_FILE)
 
 # export for sub-makefiles
 export CONFIG_CODE_COVERAGE
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index cb66defac..21fe92bda 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1,3 +1,9 @@
+CONFIG_FILE = .config
+
+ifneq ($(CONFIG_FILE),)
+-include $(CONFIG_FILE)
+endif
+
 BINALL=wpa_supplicant wpa_cli
 
 ifndef CONFIG_NO_WPA_PASSPHRASE
@@ -10,13 +16,13 @@ ALL += systemd/wpa_supplicant at .service
 ALL += systemd/wpa_supplicant-nl80211 at .service
 ALL += systemd/wpa_supplicant-wired at .service
 ALL += dbus/fi.w1.wpa_supplicant1.service
+
 ifdef CONFIG_BUILD_WPA_CLIENT_SO
 ALL += libwpa_client.so
 endif
 
 EXTRA_TARGETS=dynamic_eap_methods
 
-CONFIG_FILE=.config
 include ../src/build.rules
 
 ifdef LIBS
-- 
2.35.1




More information about the Hostap mailing list