All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH 1/2] tsocks: Add -lssp_nonshared to LIBS explicitly on musl
@ 2018-09-24 20:14 Khem Raj
  2018-09-24 20:14 ` [meta-networking][PATCH 2/2] vsftpd: Fix build with musl/x86 Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2018-09-24 20:14 UTC (permalink / raw)
  To: openembedded-devel

tsocks uses -nostdlib while linking shared library, which is not ideal
but instead of chasing that and assuming there is a reason for that, we
add -lssp_noshared to linker command at the end so it can build when
security flags are enabled

Fixes
tsocks.c:954: undefined reference to `__stack_chk_fail_local'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb b/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb
index b2757f6ddc..72913579af 100644
--- a/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb
+++ b/meta-networking/recipes-protocols/tsocks/tsocks_1.8beta5.bb
@@ -18,11 +18,13 @@ SRC_URI[sha256sum] = "849d7ef5af80d03e76cc05ed9fb8fa2bcc2b724b51ebfd1b6be11c7863
 
 inherit autotools-brokensep
 
+LIBS_append_libc-musl = " -lssp_nonshared"
+
 S = "${WORKDIR}/tsocks-1.8"
 
 FILES_${PN} = "${libdir}/* ${bindir}/tsocks"
 FILES_${PN}-dev = ""
 INSANE_SKIP_${PN} = "dev-so"
 
-EXTRA_OEMAKE = "SHCC='${CC} -fPIC ${LDFLAGS}'"
+EXTRA_OEMAKE = "SHCC='${CC} -fPIC ${LDFLAGS}' LIBS='${LIBS}'"
 
-- 
2.19.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [meta-networking][PATCH 2/2] vsftpd: Fix build with musl/x86
  2018-09-24 20:14 [meta-networking][PATCH 1/2] tsocks: Add -lssp_nonshared to LIBS explicitly on musl Khem Raj
@ 2018-09-24 20:14 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2018-09-24 20:14 UTC (permalink / raw)
  To: openembedded-devel

F_SETLKW64 and F_SETLK64 are defined in
include/asm-generic/fcntl.h on musl target
but just including this header does not work
since both include/asm-generic/fcntl.h and include/fcntl.h
define same structures resulting in
conflicting declaration of structs.
Having local definitions of these values seems reasonable here.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
index 80b0117c88..2e3e0e8843 100644
--- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
+++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb
@@ -47,7 +47,7 @@ inherit update-rc.d useradd systemd
 
 CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf"
 LDFLAGS_append =" -lcrypt -lcap"
-
+CFLAGS_append_libc-musl = " -D_GNU_SOURCE -include fcntl.h"
 EXTRA_OEMAKE = "-e MAKEFLAGS="
 
 do_configure() {
-- 
2.19.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-24 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-24 20:14 [meta-networking][PATCH 1/2] tsocks: Add -lssp_nonshared to LIBS explicitly on musl Khem Raj
2018-09-24 20:14 ` [meta-networking][PATCH 2/2] vsftpd: Fix build with musl/x86 Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.