* [PATCH] lua5.1: link to libpthread when using uclibc
@ 2010-10-16 9:09 Petr Štetiar
2010-10-22 8:32 ` Petr Štetiar
0 siblings, 1 reply; 2+ messages in thread
From: Petr Štetiar @ 2010-10-16 9:09 UTC (permalink / raw)
To: openembedded-devel
When the Lua modules are linked with pthreads, loading them crashes Lua. It's
some bug in pthread_create() in uclibc. Anyway, linking Lua against pthread
fixes this issue.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
recipes/lua/lua5.1/uclibc-pthread.patch | 13 +++++++++++++
recipes/lua/lua5.1_5.1.4.bb | 9 +++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
create mode 100644 recipes/lua/lua5.1/uclibc-pthread.patch
diff --git a/recipes/lua/lua5.1/uclibc-pthread.patch b/recipes/lua/lua5.1/uclibc-pthread.patch
new file mode 100644
index 0000000..0555e81
--- /dev/null
+++ b/recipes/lua/lua5.1/uclibc-pthread.patch
@@ -0,0 +1,13 @@
+Index: lua-5.1.4/src/Makefile
+===================================================================
+--- lua-5.1.4.orig/src/Makefile 2010-10-16 09:51:52.000000000 +0200
++++ lua-5.1.4/src/Makefile 2010-10-16 09:52:15.000000000 +0200
+@@ -12,7 +12,7 @@
+ AR= ar rcu
+ RANLIB= ranlib
+ RM= rm -f
+-LIBS= -lm $(MYLIBS)
++LIBS= -lm -lpthread $(MYLIBS)
+
+ MYCFLAGS=
+ MYLDFLAGS=
diff --git a/recipes/lua/lua5.1_5.1.4.bb b/recipes/lua/lua5.1_5.1.4.bb
index 75b48f4..ba2f8b9 100644
--- a/recipes/lua/lua5.1_5.1.4.bb
+++ b/recipes/lua/lua5.1_5.1.4.bb
@@ -4,14 +4,19 @@ LICENSE = "MIT"
HOMEPAGE = "http://www.lua.org/"
DEPENDS += "readline"
-PR = "r6"
+PR = "r7"
SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \
file://bitwise_operators.patch \
- file://lua5.1.pc"
+ file://lua5.1.pc \
+ "
S = "${WORKDIR}/lua-${PV}"
inherit pkgconfig binconfig
+UCLIBC_PATCHES += "file://uclibc-pthread.patch"
+SRC_URI_append_linux-uclibc = "${UCLIBC_PATCHES}"
+SRC_URI_append_linux-uclibceabi = "${UCLIBC_PATCHES}"
+
TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -DLUA_USE_LINUX -fPIC' MYLDFLAGS='${LDFLAGS}'"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-22 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-16 9:09 [PATCH] lua5.1: link to libpthread when using uclibc Petr Štetiar
2010-10-22 8:32 ` Petr Štetiar
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.