* [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot
@ 2012-07-16 13:45 Francois Perrad
2012-07-16 13:45 ` [Buildroot] [PATCH 2/5] lua : don't install static library in target Francois Perrad
` (4 more replies)
0 siblings, 5 replies; 16+ messages in thread
From: Francois Perrad @ 2012-07-16 13:45 UTC (permalink / raw)
To: buildroot
BR2_PACKAGE_LUA_SHARED_LIBRARY is an option for install, not for build
---
package/lua/lua.mk | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/package/lua/lua.mk b/package/lua/lua.mk
index baa459c..2fc838b 100644
--- a/package/lua/lua.mk
+++ b/package/lua/lua.mk
@@ -8,10 +8,7 @@ LUA_VERSION = 5.1.5
LUA_SITE = http://www.lua.org/ftp
LUA_INSTALL_STAGING = YES
-ifeq ($(BR2_PACKAGE_LUA_SHARED_LIBRARY),y)
- LUA_MYCFLAGS += -fPIC
-endif
-
+LUA_MYCFLAGS += -fPIC
LUA_MYLIBS += -ldl
ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_READLINE),y)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* [Buildroot] [PATCH 2/5] lua : don't install static library in target 2012-07-16 13:45 [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Francois Perrad @ 2012-07-16 13:45 ` Francois Perrad 2012-07-16 15:41 ` Thomas Petazzoni 2012-07-16 13:45 ` [Buildroot] [PATCH 3/5] lua : don't install shared library in staging Francois Perrad ` (3 subsequent siblings) 4 siblings, 1 reply; 16+ messages in thread From: Francois Perrad @ 2012-07-16 13:45 UTC (permalink / raw) To: buildroot --- package/lua/lua.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/package/lua/lua.mk b/package/lua/lua.mk index 2fc838b..ab9a1a2 100644 --- a/package/lua/lua.mk +++ b/package/lua/lua.mk @@ -79,11 +79,6 @@ define LUA_INSTALL_LIBRARY $(INSTALL) $(@D)/src/liblua.so.$(LUA_VERSION) \ $(TARGET_DIR)/usr/lib/liblua.so.$(LUA_VERSION) ln -sf liblua.so.$(LUA_VERSION) $(TARGET_DIR)/usr/lib/liblua.so - $(INSTALL) $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a -endef -else -define LUA_INSTALL_LIBRARY - $(INSTALL) $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a endef endif -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 2/5] lua : don't install static library in target 2012-07-16 13:45 ` [Buildroot] [PATCH 2/5] lua : don't install static library in target Francois Perrad @ 2012-07-16 15:41 ` Thomas Petazzoni 0 siblings, 0 replies; 16+ messages in thread From: Thomas Petazzoni @ 2012-07-16 15:41 UTC (permalink / raw) To: buildroot Le Mon, 16 Jul 2012 15:45:49 +0200, Francois Perrad <fperrad@gmail.com> a ?crit : > --- > package/lua/lua.mk | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/package/lua/lua.mk b/package/lua/lua.mk > index 2fc838b..ab9a1a2 100644 > --- a/package/lua/lua.mk > +++ b/package/lua/lua.mk > @@ -79,11 +79,6 @@ define LUA_INSTALL_LIBRARY > $(INSTALL) $(@D)/src/liblua.so.$(LUA_VERSION) \ > $(TARGET_DIR)/usr/lib/liblua.so.$(LUA_VERSION) > ln -sf liblua.so.$(LUA_VERSION) > $(TARGET_DIR)/usr/lib/liblua.so > - $(INSTALL) $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a > -endef > -else > -define LUA_INSTALL_LIBRARY > - $(INSTALL) $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a > endef > endif Well, even though not respected by all packages, the rule is normally to install all .a, .h files and everything to the target, since the target-finalize thing in the Makefile gets rid of .h and .a files when BR2_HAVE_DEVFILES is not selected. Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 3/5] lua : don't install shared library in staging 2012-07-16 13:45 [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Francois Perrad 2012-07-16 13:45 ` [Buildroot] [PATCH 2/5] lua : don't install static library in target Francois Perrad @ 2012-07-16 13:45 ` Francois Perrad 2012-07-16 15:44 ` Thomas Petazzoni 2012-07-16 13:45 ` [Buildroot] [PATCH 4/5] lua : refactor with POST_PATH_HOOKS Francois Perrad ` (2 subsequent siblings) 4 siblings, 1 reply; 16+ messages in thread From: Francois Perrad @ 2012-07-16 13:45 UTC (permalink / raw) To: buildroot dead code, LUA_INSTALL_STAGING_SHARED_LIB not used --- package/lua/lua.mk | 8 -------- 1 file changed, 8 deletions(-) diff --git a/package/lua/lua.mk b/package/lua/lua.mk index ab9a1a2..5b8022a 100644 --- a/package/lua/lua.mk +++ b/package/lua/lua.mk @@ -42,14 +42,6 @@ define HOST_LUA_BUILD_CMDS PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all endef -ifeq ($(BR2_PACKAGE_LUA_SHARED_LIBRARY),y) -define LUA_INSTALL_STAGING_SHARED_LIB - $(INSTALL) -D $(@D)/src/liblua.so.$(LUA_VERSION) \ - $(STAGING_DIR)/usr/lib/liblua.so.$(LUA_VERSION) - ln -sf liblua.so.$(LUA_VERSION) $(STAGING_DIR)/usr/lib/liblua.so -endef -endif - define LUA_INSTALL_STAGING_CMDS $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 3/5] lua : don't install shared library in staging 2012-07-16 13:45 ` [Buildroot] [PATCH 3/5] lua : don't install shared library in staging Francois Perrad @ 2012-07-16 15:44 ` Thomas Petazzoni 0 siblings, 0 replies; 16+ messages in thread From: Thomas Petazzoni @ 2012-07-16 15:44 UTC (permalink / raw) To: buildroot Le Mon, 16 Jul 2012 15:45:50 +0200, Francois Perrad <fperrad@gmail.com> a ?crit : > dead code, LUA_INSTALL_STAGING_SHARED_LIB not used > --- > package/lua/lua.mk | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/package/lua/lua.mk b/package/lua/lua.mk > index ab9a1a2..5b8022a 100644 > --- a/package/lua/lua.mk > +++ b/package/lua/lua.mk > @@ -42,14 +42,6 @@ define HOST_LUA_BUILD_CMDS > PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all > endef > > -ifeq ($(BR2_PACKAGE_LUA_SHARED_LIBRARY),y) > -define LUA_INSTALL_STAGING_SHARED_LIB > - $(INSTALL) -D $(@D)/src/liblua.so.$(LUA_VERSION) \ > - $(STAGING_DIR)/usr/lib/liblua.so.$(LUA_VERSION) > - ln -sf liblua.so.$(LUA_VERSION) > $(STAGING_DIR)/usr/lib/liblua.so -endef > -endif > - > define LUA_INSTALL_STAGING_CMDS > $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \ > $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc Doh? The code is probably dead, but the right thing here is not to remove, but to make it work: the liblua.so.* files *SHOULD* definitely be installed in the staging directory, just like all other shared libraries. They are needed so that other packages (that rely on the Lua shared library) can be linked against this library. The installation code in this package tries to be smart, but is in fact very complicated. It should just: * Install the shared library + .pc file + .h files + .a file to both the staging directory and target directory, unconditionally * Install the Lua compiler in the target directory if the compiler is enabled in the config * Install the Lua interpreter in the target directory if the interpreter is enabled in the config. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 4/5] lua : refactor with POST_PATH_HOOKS 2012-07-16 13:45 [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Francois Perrad 2012-07-16 13:45 ` [Buildroot] [PATCH 2/5] lua : don't install static library in target Francois Perrad 2012-07-16 13:45 ` [Buildroot] [PATCH 3/5] lua : don't install shared library in staging Francois Perrad @ 2012-07-16 13:45 ` Francois Perrad 2012-07-16 15:46 ` Thomas Petazzoni 2012-07-16 13:45 ` [Buildroot] [PATCH 5/5] lua: split and rename patches Francois Perrad 2012-07-16 15:39 ` [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Thomas Petazzoni 4 siblings, 1 reply; 16+ messages in thread From: Francois Perrad @ 2012-07-16 13:45 UTC (permalink / raw) To: buildroot --- package/lua/lua.mk | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/package/lua/lua.mk b/package/lua/lua.mk index 5b8022a..04c47fc 100644 --- a/package/lua/lua.mk +++ b/package/lua/lua.mk @@ -23,9 +23,19 @@ HOST_LUA_DEPENDENCIES = HOST_LUA_MYCFLAGS = -fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX HOST_LUA_MYLIBS = -ldl +define LUA_PREFIX_FIX_PKG_CONFIG + $(SED) 's/\/usr\/local/\/usr/' $(@D)/etc/lua.pc +endef +LUA_POST_PATCH_HOOKS += LUA_PREFIX_FIX_PKG_CONFIG +HOST_LUA_POST_PATCH_HOOKS += LUA_PREFIX_FIX_PKG_CONFIG + +define LUA_OPTIM_FIX_MAKEFILE + $(SED) 's/-O2//' $(@D)/src/Makefile +endef +LUA_POST_PATCH_HOOKS += LUA_OPTIM_FIX_MAKEFILE +HOST_LUA_POST_PATCH_HOOKS += LUA_OPTIM_FIX_MAKEFILE + define LUA_BUILD_CMDS - sed -i -e 's/-O2//' $(@D)/src/Makefile - sed -i -e 's/\/usr\/local/\/usr/' $(@D)/etc/lua.pc $(MAKE) \ CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \ MYCFLAGS="$(TARGET_CFLAGS) $(LUA_MYCFLAGS)" \ @@ -34,8 +44,6 @@ define LUA_BUILD_CMDS endef define HOST_LUA_BUILD_CMDS - sed -i -e 's/-O2//' $(@D)/src/Makefile - sed -i -e 's/\/usr\/local/\/usr/' $(@D)/etc/lua.pc $(MAKE) \ MYCFLAGS="$(HOST_LUA_MYCFLAGS)" \ MYLIBS="$(HOST_LUA_MYLIBS)" \ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 4/5] lua : refactor with POST_PATH_HOOKS 2012-07-16 13:45 ` [Buildroot] [PATCH 4/5] lua : refactor with POST_PATH_HOOKS Francois Perrad @ 2012-07-16 15:46 ` Thomas Petazzoni 0 siblings, 0 replies; 16+ messages in thread From: Thomas Petazzoni @ 2012-07-16 15:46 UTC (permalink / raw) To: buildroot Le Mon, 16 Jul 2012 15:45:51 +0200, Francois Perrad <fperrad@gmail.com> a ?crit : > +define LUA_PREFIX_FIX_PKG_CONFIG > + $(SED) 's/\/usr\/local/\/usr/' $(@D)/etc/lua.pc > +endef > +LUA_POST_PATCH_HOOKS += LUA_PREFIX_FIX_PKG_CONFIG > +HOST_LUA_POST_PATCH_HOOKS += LUA_PREFIX_FIX_PKG_CONFIG > + > +define LUA_OPTIM_FIX_MAKEFILE > + $(SED) 's/-O2//' $(@D)/src/Makefile > +endef > +LUA_POST_PATCH_HOOKS += LUA_OPTIM_FIX_MAKEFILE > +HOST_LUA_POST_PATCH_HOOKS += LUA_OPTIM_FIX_MAKEFILE It sounds odd to me to have a patch to fix the /usr prefix in src/luaconf.h on one side, and on the other side, fix other problems by using sed in the .mk file. Either one or the other, but not both in the same package. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 5/5] lua: split and rename patches 2012-07-16 13:45 [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Francois Perrad ` (2 preceding siblings ...) 2012-07-16 13:45 ` [Buildroot] [PATCH 4/5] lua : refactor with POST_PATH_HOOKS Francois Perrad @ 2012-07-16 13:45 ` Francois Perrad 2012-07-16 15:47 ` Thomas Petazzoni 2012-07-16 15:39 ` [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Thomas Petazzoni 4 siblings, 1 reply; 16+ messages in thread From: Francois Perrad @ 2012-07-16 13:45 UTC (permalink / raw) To: buildroot --- package/lua/lua-01-root-path.patch | 17 +++ package/lua/lua-02-shared-libs-for-lua.patch | 44 ++++++++ package/lua/lua-03-shared-libs-for-luac.patch | 92 +++++++++++++++ package/lua/lua-root-path.patch | 17 --- package/lua/lua-shared-libs.patch | 150 ------------------------- 5 files changed, 153 insertions(+), 167 deletions(-) create mode 100644 package/lua/lua-01-root-path.patch create mode 100644 package/lua/lua-02-shared-libs-for-lua.patch create mode 100644 package/lua/lua-03-shared-libs-for-luac.patch delete mode 100644 package/lua/lua-root-path.patch delete mode 100644 package/lua/lua-shared-libs.patch diff --git a/package/lua/lua-01-root-path.patch b/package/lua/lua-01-root-path.patch new file mode 100644 index 0000000..c31cb2c --- /dev/null +++ b/package/lua/lua-01-root-path.patch @@ -0,0 +1,17 @@ +Index: b/src/luaconf.h +=================================================================== +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -94,9 +94,9 @@ + ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" + + #else +-#define LUA_ROOT "/usr/local/" +-#define LUA_LDIR LUA_ROOT "share/lua/5.1/" +-#define LUA_CDIR LUA_ROOT "lib/lua/5.1/" ++#define LUA_ROOT "/usr/" ++#define LUA_LDIR LUA_ROOT "share/lua/" ++#define LUA_CDIR LUA_ROOT "lib/lua/" + #define LUA_PATH_DEFAULT \ + "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ + LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" diff --git a/package/lua/lua-02-shared-libs-for-lua.patch b/package/lua/lua-02-shared-libs-for-lua.patch new file mode 100644 index 0000000..ebfcf2d --- /dev/null +++ b/package/lua/lua-02-shared-libs-for-lua.patch @@ -0,0 +1,44 @@ +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -23,6 +23,7 @@ + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ + lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ + lundump.o lvm.o lzio.o +@@ -36,8 +37,9 @@ + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) + ALL_A= $(LUA_A) ++ALL_SO= $(LUA_SO) + + default: $(PLAT) + +@@ -47,12 +49,18 @@ + + a: $(ALL_A) + ++so: $(ALL_SO) ++ + $(LUA_A): $(CORE_O) $(LIB_O) + $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files + $(RANLIB) $@ + +-$(LUA_T): $(LUA_O) $(LUA_A) +- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? -nostdlib -lgcc ++ ln -fs $@.$(PKG_VERSION) $@ ++ ++$(LUA_T): $(LUA_O) $(LUA_SO) ++ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS) + + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) diff --git a/package/lua/lua-03-shared-libs-for-luac.patch b/package/lua/lua-03-shared-libs-for-luac.patch new file mode 100644 index 0000000..e97146d --- /dev/null +++ b/package/lua/lua-03-shared-libs-for-luac.patch @@ -0,0 +1,92 @@ +Index: b/src/ldo.h +=================================================================== +--- a/src/ldo.h ++++ b/src/ldo.h +@@ -46,7 +46,7 @@ + LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); + LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); + LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); +-LUAI_FUNC void luaD_growstack (lua_State *L, int n); ++LUA_API void luaD_growstack (lua_State *L, int n); + + LUAI_FUNC void luaD_throw (lua_State *L, int errcode); + LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); +Index: b/src/lfunc.h +=================================================================== +--- a/src/lfunc.h ++++ b/src/lfunc.h +@@ -18,7 +18,7 @@ + cast(int, sizeof(TValue *)*((n)-1))) + + +-LUAI_FUNC Proto *luaF_newproto (lua_State *L); ++LUA_API Proto *luaF_newproto (lua_State *L); + LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); + LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); + LUAI_FUNC UpVal *luaF_newupval (lua_State *L); +Index: b/src/lmem.h +=================================================================== +--- a/src/lmem.h ++++ b/src/lmem.h +@@ -38,9 +38,9 @@ + ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) + + +-LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, ++LUA_API void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, + size_t size); +-LUAI_FUNC void *luaM_toobig (lua_State *L); ++LUA_API void *luaM_toobig (lua_State *L); + LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, + size_t size_elem, int limit, + const char *errormsg); +Index: b/src/lstring.h +=================================================================== +--- a/src/lstring.h ++++ b/src/lstring.h +@@ -25,7 +25,7 @@ + + LUAI_FUNC void luaS_resize (lua_State *L, int newsize); + LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); +-LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); ++LUA_API TString *luaS_newlstr (lua_State *L, const char *str, size_t l); + + + #endif +Index: b/src/lundump.h +=================================================================== +--- a/src/lundump.h ++++ b/src/lundump.h +@@ -17,7 +17,7 @@ + LUAI_FUNC void luaU_header (char* h); + + /* dump one chunk; from ldump.c */ +-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); ++LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); + + #ifdef luac_c + /* print one chunk; from print.c */ +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -34,7 +34,7 @@ + LUA_O= lua.o + + LUAC_T= luac +-LUAC_O= luac.o print.o ++LUAC_O= luac.o print.o lopcodes.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) + ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) +@@ -62,8 +62,8 @@ + $(LUA_T): $(LUA_O) $(LUA_SO) + $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS) + +-$(LUAC_T): $(LUAC_O) $(LUA_A) +- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) ++$(LUAC_T): $(LUAC_O) $(LUA_SO) ++ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LIBS) + + clean: + $(RM) $(ALL_T) $(ALL_O) diff --git a/package/lua/lua-root-path.patch b/package/lua/lua-root-path.patch deleted file mode 100644 index c31cb2c..0000000 --- a/package/lua/lua-root-path.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: b/src/luaconf.h -=================================================================== ---- a/src/luaconf.h -+++ b/src/luaconf.h -@@ -94,9 +94,9 @@ - ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" - - #else --#define LUA_ROOT "/usr/local/" --#define LUA_LDIR LUA_ROOT "share/lua/5.1/" --#define LUA_CDIR LUA_ROOT "lib/lua/5.1/" -+#define LUA_ROOT "/usr/" -+#define LUA_LDIR LUA_ROOT "share/lua/" -+#define LUA_CDIR LUA_ROOT "lib/lua/" - #define LUA_PATH_DEFAULT \ - "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" diff --git a/package/lua/lua-shared-libs.patch b/package/lua/lua-shared-libs.patch deleted file mode 100644 index 6bca7f2..0000000 --- a/package/lua/lua-shared-libs.patch +++ /dev/null @@ -1,150 +0,0 @@ -Index: b/Makefile -=================================================================== ---- a/Makefile -+++ b/Makefile -@@ -43,7 +43,7 @@ - # What to install. - TO_BIN= lua luac - TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp --TO_LIB= liblua.a -+TO_LIB= liblua.a liblua.so.$R - TO_MAN= lua.1 luac.1 - - # Lua version and release. -@@ -63,6 +63,7 @@ - cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) - cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) - cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) -+ ln -sf liblua.so.$R $(INSTALL_LIB)/liblua.so - cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) - - ranlib: -Index: b/src/ldo.h -=================================================================== ---- a/src/ldo.h -+++ b/src/ldo.h -@@ -46,7 +46,7 @@ - LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); - LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize); - LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); --LUAI_FUNC void luaD_growstack (lua_State *L, int n); -+LUA_API void luaD_growstack (lua_State *L, int n); - - LUAI_FUNC void luaD_throw (lua_State *L, int errcode); - LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); -Index: b/src/lfunc.h -=================================================================== ---- a/src/lfunc.h -+++ b/src/lfunc.h -@@ -18,7 +18,7 @@ - cast(int, sizeof(TValue *)*((n)-1))) - - --LUAI_FUNC Proto *luaF_newproto (lua_State *L); -+LUA_API Proto *luaF_newproto (lua_State *L); - LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); - LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); - LUAI_FUNC UpVal *luaF_newupval (lua_State *L); -Index: b/src/lmem.h -=================================================================== ---- a/src/lmem.h -+++ b/src/lmem.h -@@ -38,9 +38,9 @@ - ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) - - --LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, -+LUA_API void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, - size_t size); --LUAI_FUNC void *luaM_toobig (lua_State *L); -+LUA_API void *luaM_toobig (lua_State *L); - LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, - size_t size_elem, int limit, - const char *errormsg); -Index: b/src/lstring.h -=================================================================== ---- a/src/lstring.h -+++ b/src/lstring.h -@@ -25,7 +25,7 @@ - - LUAI_FUNC void luaS_resize (lua_State *L, int newsize); - LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); --LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); -+LUA_API TString *luaS_newlstr (lua_State *L, const char *str, size_t l); - - - #endif -Index: b/src/lundump.h -=================================================================== ---- a/src/lundump.h -+++ b/src/lundump.h -@@ -17,7 +17,7 @@ - LUAI_FUNC void luaU_header (char* h); - - /* dump one chunk; from ldump.c */ --LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); -+LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); - - #ifdef luac_c - /* print one chunk; from print.c */ -Index: b/src/Makefile -=================================================================== ---- a/src/Makefile -+++ b/src/Makefile -@@ -23,6 +23,7 @@ - PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris - - LUA_A= liblua.a -+LUA_SO= liblua.so - CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ - lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ - lundump.o lvm.o lzio.o -@@ -33,11 +34,12 @@ - LUA_O= lua.o - - LUAC_T= luac --LUAC_O= luac.o print.o -+LUAC_O= luac.o print.o lopcodes.o - - ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) --ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) -+ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) - ALL_A= $(LUA_A) -+ALL_SO= $(LUA_SO) - - default: $(PLAT) - -@@ -47,14 +49,23 @@ - - a: $(ALL_A) - -+so: $(ALL_SO) -+ - $(LUA_A): $(CORE_O) $(LIB_O) - $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files - $(RANLIB) $@ - -+$(LUA_SO): $(CORE_O) $(LIB_O) -+ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? -nostdlib -lgcc -+ ln -fs $@.$(PKG_VERSION) $@ -+ - $(LUA_T): $(LUA_O) $(LUA_A) -- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) -+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) - - $(LUAC_T): $(LUAC_O) $(LUA_A) -+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) -+ -+$(LUAC_T)-host: $(LUAC_O) $(LUA_A) - $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) - - clean: -@@ -96,7 +107,7 @@ - $(MAKE) all MYCFLAGS= - - linux: -- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" -+ $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" - - macosx: - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 5/5] lua: split and rename patches 2012-07-16 13:45 ` [Buildroot] [PATCH 5/5] lua: split and rename patches Francois Perrad @ 2012-07-16 15:47 ` Thomas Petazzoni 0 siblings, 0 replies; 16+ messages in thread From: Thomas Petazzoni @ 2012-07-16 15:47 UTC (permalink / raw) To: buildroot Le Mon, 16 Jul 2012 15:45:52 +0200, Francois Perrad <fperrad@gmail.com> a ?crit : > --- > package/lua/lua-01-root-path.patch | 17 +++ > package/lua/lua-02-shared-libs-for-lua.patch | 44 ++++++++ > package/lua/lua-03-shared-libs-for-luac.patch | 92 +++++++++++++++ > package/lua/lua-root-path.patch | 17 --- > package/lua/lua-shared-libs.patch | 150 > ------------------------- 5 files changed, 153 insertions(+), 167 > deletions(-) create mode 100644 package/lua/lua-01-root-path.patch > create mode 100644 package/lua/lua-02-shared-libs-for-lua.patch > create mode 100644 package/lua/lua-03-shared-libs-for-luac.patch > delete mode 100644 package/lua/lua-root-path.patch > delete mode 100644 package/lua/lua-shared-libs.patch Looks good, but please take this opportunity to add a header to each patch, with a description + signed-off-by. Thanks! Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot 2012-07-16 13:45 [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Francois Perrad ` (3 preceding siblings ...) 2012-07-16 13:45 ` [Buildroot] [PATCH 5/5] lua: split and rename patches Francois Perrad @ 2012-07-16 15:39 ` Thomas Petazzoni 2012-07-17 8:35 ` François Perrad 4 siblings, 1 reply; 16+ messages in thread From: Thomas Petazzoni @ 2012-07-16 15:39 UTC (permalink / raw) To: buildroot Le Mon, 16 Jul 2012 15:45:48 +0200, Francois Perrad <fperrad@gmail.com> a ?crit : > BR2_PACKAGE_LUA_SHARED_LIBRARY is an option for install, not for build > --- > package/lua/lua.mk | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/package/lua/lua.mk b/package/lua/lua.mk > index baa459c..2fc838b 100644 > --- a/package/lua/lua.mk > +++ b/package/lua/lua.mk > @@ -8,10 +8,7 @@ LUA_VERSION = 5.1.5 > LUA_SITE = http://www.lua.org/ftp > LUA_INSTALL_STAGING = YES > > -ifeq ($(BR2_PACKAGE_LUA_SHARED_LIBRARY),y) > - LUA_MYCFLAGS += -fPIC > -endif > - > +LUA_MYCFLAGS += -fPIC > LUA_MYLIBS += -ldl > > ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_READLINE),y) If Lua is not build as a shared library, there is no point in building the object files with the -fPIC argument, so the existing code seems to make sense to me. The BR2_PACKAGE_LUA_SHARED_LIBRARY affects both the build time (we don't build with -fPIC) and the install time (we install the shared libraries). But I'm confused: during the Libre Software Meeting, didn't we discussed that the BR2_PACKAGE_LUA_SHARED_LIBRARY option should go away, and that the BR2_PACKAGE_LUA option should unconditionally install the shared libraries, and then there would be sub-options for the interpreter and compiler? Thanks! Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot 2012-07-16 15:39 ` [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Thomas Petazzoni @ 2012-07-17 8:35 ` François Perrad 2012-07-17 8:40 ` Thomas Petazzoni 0 siblings, 1 reply; 16+ messages in thread From: François Perrad @ 2012-07-17 8:35 UTC (permalink / raw) To: buildroot 2012/7/16 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > Le Mon, 16 Jul 2012 15:45:48 +0200, > Francois Perrad <fperrad@gmail.com> a ?crit : > >> BR2_PACKAGE_LUA_SHARED_LIBRARY is an option for install, not for build >> --- >> package/lua/lua.mk | 5 +---- >> 1 file changed, 1 insertion(+), 4 deletions(-) >> >> diff --git a/package/lua/lua.mk b/package/lua/lua.mk >> index baa459c..2fc838b 100644 >> --- a/package/lua/lua.mk >> +++ b/package/lua/lua.mk >> @@ -8,10 +8,7 @@ LUA_VERSION = 5.1.5 >> LUA_SITE = http://www.lua.org/ftp >> LUA_INSTALL_STAGING = YES >> >> -ifeq ($(BR2_PACKAGE_LUA_SHARED_LIBRARY),y) >> - LUA_MYCFLAGS += -fPIC >> -endif >> - >> +LUA_MYCFLAGS += -fPIC >> LUA_MYLIBS += -ldl >> >> ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_READLINE),y) > > If Lua is not build as a shared library, there is no point in building > the object files with the -fPIC argument, so the existing code seems to > make sense to me. The BR2_PACKAGE_LUA_SHARED_LIBRARY affects both the > build time (we don't build with -fPIC) and the install time (we install > the shared libraries). > > But I'm confused: during the Libre Software Meeting, didn't we discussed > that the BR2_PACKAGE_LUA_SHARED_LIBRARY option should go away, and that > the BR2_PACKAGE_LUA option should unconditionally install the shared > libraries, and then there would be sub-options for the interpreter and > compiler? > I want remove BR2_PACKAGE_LUA_SHARED_LIBRARY only in Lua modules, because it is an internal of the lua package, and Lua modules must be used with Lua or LuaJIT. see http://patchwork.ozlabs.org/patch/162294/ Fran?ois > Thanks! > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot 2012-07-17 8:35 ` François Perrad @ 2012-07-17 8:40 ` Thomas Petazzoni 2012-07-17 14:46 ` [Buildroot] [UNSURE]Re: " François Perrad 0 siblings, 1 reply; 16+ messages in thread From: Thomas Petazzoni @ 2012-07-17 8:40 UTC (permalink / raw) To: buildroot Le Tue, 17 Jul 2012 10:35:15 +0200, Fran?ois Perrad <francois.perrad@gadz.org> a ?crit : > I want remove BR2_PACKAGE_LUA_SHARED_LIBRARY only in Lua modules, > because it is an internal of the lua package, and Lua modules must be > used with Lua or LuaJIT. > > see http://patchwork.ozlabs.org/patch/162294/ Yes, you said that to me during the Libre Software Meeting, but this modification isn't part of the 5 patches patch set you have sent yesterday, so I was a bit confused. Can we have a complete patch set, with *all* your proposed changes to the Lua packaging? It's really complex to review patches for which you say that anyway such or such option is removed by a later patch, which is not in the same patch series. Thanks! Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [UNSURE]Re: [PATCH 1/5] lua : fix autobuild.buildroot 2012-07-17 8:40 ` Thomas Petazzoni @ 2012-07-17 14:46 ` François Perrad 2012-07-17 14:57 ` Thomas Petazzoni 0 siblings, 1 reply; 16+ messages in thread From: François Perrad @ 2012-07-17 14:46 UTC (permalink / raw) To: buildroot 2012/7/17 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > Le Tue, 17 Jul 2012 10:35:15 +0200, > Fran?ois Perrad <francois.perrad@gadz.org> a ?crit : > >> I want remove BR2_PACKAGE_LUA_SHARED_LIBRARY only in Lua modules, >> because it is an internal of the lua package, and Lua modules must be >> used with Lua or LuaJIT. >> >> see http://patchwork.ozlabs.org/patch/162294/ > > Yes, you said that to me during the Libre Software Meeting, but this > modification isn't part of the 5 patches patch set you have sent > yesterday, so I was a bit confused. > > Can we have a complete patch set, with *all* your proposed changes to > the Lua packaging? > > It's really complex to review patches for which you say that anyway > such or such option is removed by a later patch, which is not in the > same patch series. > There are 3 series of patches : a serie for luajit [1/2] luajit: new package work in progress [2/2] luajit: fix dependencies of Lua modules a serie for refactor lua [PATCH 1/5] lua : fix autobuild.buildroot [PATCH 2/5] lua : don't install static library in target [PATCH 3/5] lua : don't install shared library in staging [PATCH 4/5] lua : refactor with POST_PATH_HOOKS [PATCH 5/5] lua: split and rename patches trash them, only the last one deserves to be saved by a new version a new serie for refactor lua [PATCH 1/2] lua: split and rename patches v2 [PATCH 2/2] lua: refactor root path Fran?ois > Thanks! > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [UNSURE]Re: [PATCH 1/5] lua : fix autobuild.buildroot 2012-07-17 14:46 ` [Buildroot] [UNSURE]Re: " François Perrad @ 2012-07-17 14:57 ` Thomas Petazzoni 2012-07-17 15:20 ` [Buildroot] [UNSURE]Re: " François Perrad 0 siblings, 1 reply; 16+ messages in thread From: Thomas Petazzoni @ 2012-07-17 14:57 UTC (permalink / raw) To: buildroot Le Tue, 17 Jul 2012 16:46:32 +0200, Fran?ois Perrad <francois.perrad@gadz.org> a ?crit : > There are 3 series of patches : > > a serie for luajit > [1/2] luajit: new package > work in progress > [2/2] luajit: fix dependencies of Lua modules Ok, so I need to wait for both of these that you prepare a nice patch set that solves the bitness building problem for luajit. Correct? > a serie for refactor lua > [PATCH 1/5] lua : fix autobuild.buildroot > [PATCH 2/5] lua : don't install static library in target > [PATCH 3/5] lua : don't install shared library in staging > [PATCH 4/5] lua : refactor with POST_PATH_HOOKS > [PATCH 5/5] lua: split and rename patches > trash them, only the last one deserves to be saved by a new version Ok, so I ignore those 5 patches, correct? > a new serie for refactor lua > [PATCH 1/2] lua: split and rename patches v2 > [PATCH 2/2] lua: refactor root path Ok, I will merge them. Thanks, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [UNSURE]Re: [UNSURE]Re: [PATCH 1/5] lua : fix autobuild.buildroot 2012-07-17 14:57 ` Thomas Petazzoni @ 2012-07-17 15:20 ` François Perrad 2012-07-17 21:35 ` Thomas Petazzoni 0 siblings, 1 reply; 16+ messages in thread From: François Perrad @ 2012-07-17 15:20 UTC (permalink / raw) To: buildroot 2012/7/17 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > Le Tue, 17 Jul 2012 16:46:32 +0200, > Fran?ois Perrad <francois.perrad@gadz.org> a ?crit : > >> There are 3 series of patches : >> >> a serie for luajit >> [1/2] luajit: new package >> work in progress >> [2/2] luajit: fix dependencies of Lua modules > > Ok, so I need to wait for both of these that you prepare a nice patch > set that solves the bitness building problem for luajit. Correct? > as you suggest, I use (with success) the proposal of Jean-Christophe Plagnol-Villard (http://patchwork.ozlabs.org/patch/153235/) so now, in fact, I wait you integrate it. >> a serie for refactor lua >> [PATCH 1/5] lua : fix autobuild.buildroot >> [PATCH 2/5] lua : don't install static library in target >> [PATCH 3/5] lua : don't install shared library in staging >> [PATCH 4/5] lua : refactor with POST_PATH_HOOKS >> [PATCH 5/5] lua: split and rename patches >> trash them, only the last one deserves to be saved by a new version > > Ok, so I ignore those 5 patches, correct? ok > >> a new serie for refactor lua >> [PATCH 1/2] lua: split and rename patches v2 >> [PATCH 2/2] lua: refactor root path > > Ok, I will merge them. > > Thanks, > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Buildroot] [UNSURE]Re: [UNSURE]Re: [PATCH 1/5] lua : fix autobuild.buildroot 2012-07-17 15:20 ` [Buildroot] [UNSURE]Re: " François Perrad @ 2012-07-17 21:35 ` Thomas Petazzoni 0 siblings, 0 replies; 16+ messages in thread From: Thomas Petazzoni @ 2012-07-17 21:35 UTC (permalink / raw) To: buildroot Le Tue, 17 Jul 2012 17:20:58 +0200, Fran?ois Perrad <francois.perrad@gadz.org> a ?crit : > as you suggest, I use (with success) the proposal of Jean-Christophe > Plagnol-Villard > (http://patchwork.ozlabs.org/patch/153235/) > so now, in fact, I wait you integrate it. Please send a proper patch set with all the patches that are needed. If you want your changes to be integrated, they need to be easy to review and integrate. And for the moment, you're just sending multiple individual patches, hoping that someone will figure out which patch still makes sense, how the patches relate between each other, etc. I have applied your patches that rework the Lua interpreter patches, but for the luajit package, I'm waiting for a clean patch series from you in order to merge things. And when you send updated versions of your patches, please send a new complete series of patches. Thanks! Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2012-07-17 21:35 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-07-16 13:45 [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Francois Perrad 2012-07-16 13:45 ` [Buildroot] [PATCH 2/5] lua : don't install static library in target Francois Perrad 2012-07-16 15:41 ` Thomas Petazzoni 2012-07-16 13:45 ` [Buildroot] [PATCH 3/5] lua : don't install shared library in staging Francois Perrad 2012-07-16 15:44 ` Thomas Petazzoni 2012-07-16 13:45 ` [Buildroot] [PATCH 4/5] lua : refactor with POST_PATH_HOOKS Francois Perrad 2012-07-16 15:46 ` Thomas Petazzoni 2012-07-16 13:45 ` [Buildroot] [PATCH 5/5] lua: split and rename patches Francois Perrad 2012-07-16 15:47 ` Thomas Petazzoni 2012-07-16 15:39 ` [Buildroot] [PATCH 1/5] lua : fix autobuild.buildroot Thomas Petazzoni 2012-07-17 8:35 ` François Perrad 2012-07-17 8:40 ` Thomas Petazzoni 2012-07-17 14:46 ` [Buildroot] [UNSURE]Re: " François Perrad 2012-07-17 14:57 ` Thomas Petazzoni 2012-07-17 15:20 ` [Buildroot] [UNSURE]Re: " François Perrad 2012-07-17 21:35 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox