Skip to contentSkip to conversation

vsftpd: use pkg-config to get OpenSSL link flags

PATCH New Thomas Petazzoni 3 participants 3 messages May 12, 2015 – May 13, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vsftpd: use pkg-config to get OpenSSL link flags

Instead of hardcoding -lssl -lcrypto as the linker flags to link with OpenSSL, use pkg-config to fetch those flags. This allows to behave properly when doing static linking, since pkg-config returns the entire set of libraries we should link against.

Fixes:

http://autobuild.buildroot.org/results/d71/d710ecfa9ed0a8e3f97d2010d3dabb372485c7f2/

---
 package/vsftpd/vsftpd.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/vsftpd/vsftpd.mk +2 -2
index b94328d..ed15f00 100644
@@ -23,8 +23,8 @@ VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_DISABLE_UTMPX
 endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-VSFTPD_DEPENDENCIES += openssl
-VSFTPD_LIBS += -lssl -lcrypto
+VSFTPD_DEPENDENCIES += openssl host-pkgconf
+VSFTPD_LIBS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs libssl)
 VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL
 endif
 
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 vsftpd: use pkg-config to get OpenSSL link flags

Quoted 10 lines · Thomas Petazzoni

Instead of hardcoding -lssl -lcrypto as the linker flags to link with OpenSSL, use pkg-config to fetch those flags. This allows to behave properly when doing static linking, since pkg-config returns the entire set of libraries we should link against.

Fixes:

http://autobuild.buildroot.org/results/d71/d710ecfa9ed0a8e3f97d2010d3dabb372485c7f2/

by running make vsftpd with patch

Quoted 26 lines
---
 package/vsftpd/vsftpd.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/vsftpd/vsftpd.mk +2 -3
index b94328d..ed15f00 100644
@@ -23,8 +23,8 @@ VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_DISABLE_UTMPX
 endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-VSFTPD_DEPENDENCIES += openssl
-VSFTPD_LIBS += -lssl -lcrypto
+VSFTPD_DEPENDENCIES += openssl host-pkgconf
+VSFTPD_LIBS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs libssl)
 VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL
 endif
 
--

2.1.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

PATCH 1/1 vsftpd: use pkg-config to get OpenSSL link flags

In reply to Thomas Petazzoni
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Instead of hardcoding -lssl -lcrypto as the linker flags to link with OpenSSL, use pkg-config to fetch those flags. This allows to behave properly when doing static linking, since pkg-config returns the entire set of libraries we should link against.

Quoted 5 lines

Fixes:

http://autobuild.buildroot.org/results/d71/d710ecfa9ed0a8e3f97d2010d3dabb372485c7f2/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard