Skip to contentSkip to conversation

npth: Link with libpthread

PATCH In review Khem Raj 2 participants 2 messages May 12, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 npth: Link with libpthread

libnpth.so uses pthread_create so ensure its linked in

Fixes

tmp/work/core2-32-yoe-linux/npth/1.6-r0/recipe-sysroot-native/usr/bin/i686-yoe-linux/i686-yoe-linux-ld: ../src/.libs/libnpth.so: undefined reference to `pthread_create'

---
 meta/recipes-support/npth/npth_1.6.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-support/npth/npth_1.6.bb +2 -0
index 94a3f00eac..7b3ad0c95d 100644
@@ -18,6 +18,8 @@ BINCONFIG = "${bindir}/npth-config"
 
 inherit autotools binconfig-disabled multilib_header
 
+LDFLAGS += "-pthread"
+
 FILES_${PN} = "${libdir}/libnpth.so.*"
 FILES_${PN}-dev += "${bindir}/npth-config"
 
Signature · 1 line
2.31.1
#1 lore raw
Quoted 6 lines · Khem Raj

libnpth.so uses pthread_create so ensure its linked in

Fixes

tmp/work/core2-32-yoe-linux/npth/1.6-r0/recipe-sysroot-native/usr/bin/i686-yoe-linux/i686-yoe-linux-ld: ../src/.libs/libnpth.so: undefined reference to `pthread_create'

Seems like something which should be fixed by a patch to the source code (and submitted upstream).

Quoted 24 lines
---
 meta/recipes-support/npth/npth_1.6.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-support/npth/npth_1.6.bb +2 -1
index 94a3f00eac..7b3ad0c95d 100644
@@ -18,6 +18,8 @@ BINCONFIG = "${bindir}/npth-config"
 
 inherit autotools binconfig-disabled multilib_header
 
+LDFLAGS += "-pthread"
+
 FILES_${PN} = "${libdir}/libnpth.so.*"
 FILES_${PN}-dev += "${bindir}/npth-config"
 
--

2.31.1