Skip to contentSkip to conversation

host-lua: fix bug #5354

PATCH New Francois Perrad 4 participants 5 messages Nov 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 host-lua: fix bug #5354

see https://bugs.busybox.net/show_bug.cgi?id=5354

---
 package/lua/lua.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/lua/lua.mk +1 -1
index 9e0d387..3ce9867 100644
@@ -24,7 +24,7 @@ endif
 # We never want to have host-readline and host-ncurses as dependencies
 # of host-lua.
 HOST_LUA_DEPENDENCIES =
-HOST_LUA_CFLAGS = -Wall -fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX
+HOST_LUA_CFLAGS = -Wall -fPIC -fno-stack-protector -DLUA_USE_DLOPEN -DLUA_USE_POSIX
 HOST_LUA_MYLIBS = -ldl
 
 define LUA_BUILD_CMDS
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 host-lua: fix bug #5354

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Francois" == Francois Perrad <[email protected]> writes:

Francois> see https://bugs.busybox.net/show_bug.cgi?id=5354

Thanks, but I don't get the problem in the first place. Lua links lua/luac using gcc, so why doesn't it pick up the stack protection bits?

Francois> Signed-off-by: Francois Perrad <[email protected]> Francois> ---

 Francois>  package/lua/lua.mk |    2 +-

Francois> 1 file changed, 1 insertion(+), 1 deletion(-)

Francois> diff --git a/package/lua/lua.mk b/package/lua/lua.mk Francois> index 9e0d387..3ce9867 100644
Francois> --- a/package/lua/lua.mk
Francois> +++ b/package/lua/lua.mk
Francois> @@ -24,7 +24,7 @@ endif

 Francois>  # We never want to have host-readline and host-ncurses as dependencies
 Francois>  # of host-lua.
 Francois>  HOST_LUA_DEPENDENCIES =

Francois> -HOST_LUA_CFLAGS = -Wall -fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX Francois> +HOST_LUA_CFLAGS = -Wall -fPIC -fno-stack-protector -DLUA_USE_DLOPEN -DLUA_USE_POSIX Francois> HOST_LUA_MYLIBS = -ldl

Francois> define LUA_BUILD_CMDS
Francois> --
Francois> 1.7.9.5

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

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 host-lua: fix bug #5354

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Francois> see https://bugs.busybox.net/show_bug.cgi?id=5354

Peter> Thanks, but I don't get the problem in the first place. Lua links Peter> lua/luac using gcc, so why doesn't it pick up the stack protection bits?

Ahh, I see it now - It's because we're passing -nostdlib -lgcc when creating the shared library. Why are we doing that in the first place?

Gustavo, it seems to date back to 46913a2d4. Do you have any idea why it was done like that?

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 host-lua: fix bug #5354

Quoted 5 lines · Peter Korsgaard

Ahh, I see it now - It's because we're passing -nostdlib -lgcc when creating the shared library. Why are we doing that in the first place?

Gustavo, it seems to date back to 46913a2d4. Do you have any idea why it was done like that?

https://bugs.busybox.net/show_bug.cgi?id=803 has rvpaasen's work, i just reworked it IIRC.
OpenWRT doesn't try to link to libgcc or ditch the standard startup and libraries, it's worth a try to kill that bit.
Regards.

#4 lore raw

PATCH 1/1 host-lua: fix bug #5354

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Hi,

Quoted 5 lines
Quoted 5 lines

Ahh, I see it now - It's because we're passing -nostdlib -lgcc when creating the shared library. Why are we doing that in the first place?

Gustavo, it seems to date back to 46913a2d4. Do you have any idea why it was done like that?

Gustavo> https://bugs.busybox.net/show_bug.cgi?id=803 has rvpaasen's Gustavo> work, i just reworked it IIRC. OpenWRT doesn't try to link to Gustavo> libgcc or ditch the standard startup and libraries, it's worth Gustavo> a try to kill that bit.

Ok, done.

Signature · 1 line
Bye, Peter Korsgaard