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

Sergey Matyukevich geomatsi at gmail.com
Sat Feb 19 12:20:14 PST 2022


Hello Johannes,

> > 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.
> 
> Hmm, oops.
> 
> > Moving its usage after including build.rules does not help: variable
> > ALL is processed by build.rules and further changes are not applied.
> 
> Right.
> 
> > This commit moves imports of hostapd/wpa_s configuration files from
> > build.rules back into Makefiles.
> 
> That's kind of annoying. What do you think of this instead? It makes it
> rely on the "_all" internal, but still feels somewhat better to me.
> 
> johannes
> 
> 
> --- a/wpa_supplicant/Makefile
> +++ b/wpa_supplicant/Makefile
> @@ -10,15 +10,18 @@ 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 CONFIG_BUILD_WPA_CLIENT_SO
> +# add the dependency this way to allow CONFIG_BUILD_WPA_CLIENT_SO
> +# being set in the config which is read by build.rules
> +_all: libwpa_client.so
> +endif
> +
>  ifdef LIBS
>  # If LIBS is set with some global build system defaults, clone those for
>  # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well.

I am fine with this approach. But it looks like my commit message
is incomplete and wpa_passphrase is also impacted. So we should
have something like that:


diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index cb66defac..92ba3eace 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1,24 +1,27 @@
 BINALL=wpa_supplicant wpa_cli
 
-ifndef CONFIG_NO_WPA_PASSPHRASE
-BINALL += wpa_passphrase
-endif
-
 ALL = $(BINALL)
 ALL += systemd/wpa_supplicant.service
 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 CONFIG_BUILD_WPA_CLIENT_SO
+# add the dependency this way to allow CONFIG_BUILD_WPA_CLIENT_SO
+# being set in the config which is read by build.rules
+_all: libwpa_client.so
+endif
+
+ifndef CONFIG_NO_WPA_PASSPHRASE
+_all: wpa_passphrase
+endif
+
 ifdef LIBS
 # If LIBS is set with some global build system defaults, clone those for
 # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well.


Regards,
Sergey



More information about the Hostap mailing list