Skip to contentSkip to conversation

wpa_supplicant: fix static link with readline

PATCH New David du Colombier 2 participants 3 messages Sep 13, 2015 – Sep 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 wpa_supplicant: fix static link with readline

When linking statically, the order of libraries on the linker command matters, since readline depends on ncurses.

---
 .../0005-fix-readline-libs-ordering.patch          | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/wpa_supplicant/0005-fix-readline-libs-ordering.patch
package/wpa_supplicant/0005-fix-readline-libs-ordering.patch new file +26 -0
new file mode 100644
index 0000000..2a9b832
@@ -0,0 +1,26 @@
+commit 631f0893038743cebd2def39df61aceb48bd43a9
+Author: David du Colombier <[email protected]>
+Date:   Sun Sep 13 23:40:43 2015 +0200
+
+    wpa_supplicant: fix static link with readline
+    
+    The readline library depends on ncurses, so
+    it should be set before ncurses on the linker
+    command line to be able to be statically linked
+    successfully.
+
+    Signed-off-by: David du Colombier <[email protected]>
+
+diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
+index 1597412..581db02 100644
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -1408,7 +1408,7 @@ LIBS += $(DBUS_LIBS)
+ 
+ ifdef CONFIG_READLINE
+ OBJS_c += ../src/utils/edit_readline.o
+-LIBS_c += -lncurses -lreadline
++LIBS_c += -lreadline -lncurses
+ else
+ ifdef CONFIG_WPA_CLI_EDIT
+ OBJS_c += ../src/utils/edit.o
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v3 1/1 wpa_supplicant: fix static link with readline

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"David" == David du Colombier <[email protected]> writes:

When linking statically, the order of libraries on the linker command matters, since readline depends on ncurses.

Committed, thanks.

I wanted to add a reference to upstream as you mentioned that you had submitted it upstream, but I don't see it on the list:

http://lists.shmoo.com/pipermail/hostap/2015-September/thread.html

What happened?

Signature · 1 line
Bye, Peter Korsgaard