1 From cb41c214b78d6df187a31950342e48a403dbd769 Mon Sep 17 00:00:00 2001
2 From: Sergey Matyukevich <geomatsi@gmail.com>
3 Date: Tue, 22 Feb 2022 11:52:19 +0300
4 Subject: [PATCH 1/2] build: Re-enable options for libwpa_client.so and
7 Commit a41a29192e5d ("build: Pull common fragments into a build.rules
8 file") introduced a regression into wpa_supplicant build process. The
9 build target libwpa_client.so is not built regardless of whether the
10 option CONFIG_BUILD_WPA_CLIENT_SO is set or not. This happens because
11 this config option is used before it is imported from the configuration
12 file. Moving its use after including build.rules does not help: the
13 variable ALL is processed by build.rules and further changes are not
14 applied. Similarly, option CONFIG_NO_WPA_PASSPHRASE also does not work
15 as expected: wpa_passphrase is always built regardless of whether the
18 Re-enable these options by adding both build targets to _all
21 Fixes: a41a29192e5d ("build: Pull common fragments into a build.rules file")
22 Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
23 Upstream-Status: Backport
24 Signed-off-by: Alex Kiernan <alexk@zuma.ai>
25 Signed-off-by: Alex Kiernan <alexk@gmail.com>
27 wpa_supplicant/Makefile | 19 ++++++++++++-------
28 1 file changed, 12 insertions(+), 7 deletions(-)
30 diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
31 index cb66defac7c8..c456825ae75f 100644
32 --- a/wpa_supplicant/Makefile
33 +++ b/wpa_supplicant/Makefile
35 BINALL=wpa_supplicant wpa_cli
37 -ifndef CONFIG_NO_WPA_PASSPHRASE
38 -BINALL += wpa_passphrase
42 ALL += systemd/wpa_supplicant.service
43 ALL += systemd/wpa_supplicant@.service
44 ALL += systemd/wpa_supplicant-nl80211@.service
45 ALL += systemd/wpa_supplicant-wired@.service
46 ALL += dbus/fi.w1.wpa_supplicant1.service
47 -ifdef CONFIG_BUILD_WPA_CLIENT_SO
48 -ALL += libwpa_client.so
51 EXTRA_TARGETS=dynamic_eap_methods
54 include ../src/build.rules
56 +ifdef CONFIG_BUILD_WPA_CLIENT_SO
57 +# add the dependency this way to allow CONFIG_BUILD_WPA_CLIENT_SO
58 +# being set in the config which is read by build.rules
59 +_all: libwpa_client.so
62 +ifndef CONFIG_NO_WPA_PASSPHRASE
63 +# add the dependency this way to allow CONFIG_NO_WPA_PASSPHRASE
64 +# being set in the config which is read by build.rules
69 # If LIBS is set with some global build system defaults, clone those for
70 # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well.