Blame fix-i586-build.patch

d40e02
Date: 2022-03-13
d40e02
Author: Bernhard M. Wiedemann <bwiedemann suse.de>
d40e02
d40e02
fix/workaround i586 build
d40e02
https://bugzilla.opensuse.org/show_bug.cgi?id=1197065
d40e02
d40e02
It was segfaulting in premake5 because of a problem with gcc11 and the premake5 source
d40e02
(gdb) bt
d40e02
#0  0x5666a68b in ?? ()
d40e02
#1  0x565713e5 in luaL_requiref ()
d40e02
#2  0x5658e67f in luaL_openlibs ()
d40e02
#3  0x5656edc7 in main ()
d40e02
d40e02
d40e02
diff --git a/build/premake/premake5/contrib/lua/src/lapi.c b/build/premake/premake5/contrib/lua/src/lapi.c
d40e02
index 02b7fab..cd4e176 100644
d40e02
--- a/build/premake/premake5/contrib/lua/src/lapi.c
d40e02
+++ b/build/premake/premake5/contrib/lua/src/lapi.c
d40e02
@@ -204,7 +204,7 @@ static void reverse (lua_State *L, StkId from, StkId to) {
d40e02
 ** Let x = AB, where A is a prefix of length 'n'. Then,
d40e02
 ** rotate x n == BA. But BA == (A^r . B^r)^r.
d40e02
 */
d40e02
-LUA_API void lua_rotate (lua_State *L, int idx, int n) {
d40e02
+LUA_API __attribute__((noipa)) void lua_rotate (lua_State *L, int idx, int n) {
d40e02
   StkId p, t, m;
d40e02
   lua_lock(L);
d40e02
   t = L->top - 1;  /* end of stack segment being rotated */
d40e02
diff --git a/build/premake/premake5/contrib/lua/src/lua.h b/build/premake/premake5/contrib/lua/src/lua.h
d40e02
index c236e36..7d4aebb 100644
d40e02
--- a/build/premake/premake5/contrib/lua/src/lua.h
d40e02
+++ b/build/premake/premake5/contrib/lua/src/lua.h
d40e02
@@ -159,7 +159,7 @@ LUA_API int   (lua_absindex) (lua_State *L, int idx);
d40e02
 LUA_API int   (lua_gettop) (lua_State *L);
d40e02
 LUA_API void  (lua_settop) (lua_State *L, int idx);
d40e02
 LUA_API void  (lua_pushvalue) (lua_State *L, int idx);
d40e02
-LUA_API void  (lua_rotate) (lua_State *L, int idx, int n);
d40e02
+LUA_API __attribute__((noipa)) void  (lua_rotate) (lua_State *L, int idx, int n);
d40e02
 LUA_API void  (lua_copy) (lua_State *L, int fromidx, int toidx);
d40e02
 LUA_API int   (lua_checkstack) (lua_State *L, int n);
d40e02