0001-build-re-enable-options-for-libwpa_client.so-and-.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. From e6a6a4e3df52cc60425fcd037d3ec68a38f948ce Mon Sep 17 00:00:00 2001
  2. From: Sergey Matyukevich <geomatsi@gmail.com>
  3. Date: Sun, 20 Feb 2022 10:12:28 +0300
  4. Subject: [PATCH] build: re-enable options for libwpa_client.so and wpa_passphrase
  5. Commit a41a29192e5d ("build: Pull common fragments into a build.rules
  6. file") introduced regression into wpa_supplicant build process. Build
  7. target libwpa_client.so is not built regardless of whether the option
  8. CONFIG_BUILD_WPA_CLIENT_SO is set or not. This happens because config
  9. option is used before it is imported from the configuration file.
  10. Moving its usage after including build.rules does not help: variable
  11. ALL is processed by build.rules and further changes are not applied.
  12. Similarly, option CONFIG_NO_WPA_PASSPHRASE also does not work as
  13. expected: wpa_passphrase is always built regardless of whether the
  14. option is set or not.
  15. This commit re-enables options adding both build targets to _all
  16. dependencies.
  17. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
  18. ---
  19. wpa_supplicant/Makefile | 19 ++++++++++++-------
  20. 1 file changed, 12 insertions(+), 7 deletions(-)
  21. diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
  22. index cb66defac..e384cc6b8 100644
  23. --- a/wpa_supplicant/Makefile
  24. +++ b/wpa_supplicant/Makefile
  25. @@ -1,24 +1,29 @@
  26. BINALL=wpa_supplicant wpa_cli
  27. -ifndef CONFIG_NO_WPA_PASSPHRASE
  28. -BINALL += wpa_passphrase
  29. -endif
  30. -
  31. ALL = $(BINALL)
  32. ALL += systemd/wpa_supplicant.service
  33. ALL += systemd/wpa_supplicant@.service
  34. ALL += systemd/wpa_supplicant-nl80211@.service
  35. ALL += systemd/wpa_supplicant-wired@.service
  36. ALL += dbus/fi.w1.wpa_supplicant1.service
  37. -ifdef CONFIG_BUILD_WPA_CLIENT_SO
  38. -ALL += libwpa_client.so
  39. -endif
  40. EXTRA_TARGETS=dynamic_eap_methods
  41. CONFIG_FILE=.config
  42. include ../src/build.rules
  43. +ifdef CONFIG_BUILD_WPA_CLIENT_SO
  44. +# add the dependency this way to allow CONFIG_BUILD_WPA_CLIENT_SO
  45. +# being set in the config which is read by build.rules
  46. +_all: libwpa_client.so
  47. +endif
  48. +
  49. +ifndef CONFIG_NO_WPA_PASSPHRASE
  50. +# add the dependency this way to allow CONFIGNO_WPA_PASSPHRASE
  51. +# being set in the config which is read by build.rules
  52. +_all: wpa_passphrase
  53. +endif
  54. +
  55. ifdef LIBS
  56. # If LIBS is set with some global build system defaults, clone those for
  57. # LIBS_c and LIBS_p to cover wpa_passphrase and wpa_cli as well.
  58. --
  59. 2.35.1