forked from pool/lua54
- luabugs3.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua54?expand=0&rev=74
This commit is contained in:
parent
e780e2d22c
commit
ea7fea61b8
@ -1,3 +1,7 @@
|
|||||||
|
---
|
||||||
|
testes/attrib.lua | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
--- a/testes/attrib.lua
|
--- a/testes/attrib.lua
|
||||||
+++ b/testes/attrib.lua
|
+++ b/testes/attrib.lua
|
||||||
@@ -269,7 +269,7 @@ local p = "" -- On Mac OS X, redefine
|
@@ -269,7 +269,7 @@ local p = "" -- On Mac OS X, redefine
|
||||||
|
@ -4,9 +4,9 @@ Subject: build system
|
|||||||
|
|
||||||
---
|
---
|
||||||
Makefile | 22 +++++++++++-----------
|
Makefile | 22 +++++++++++-----------
|
||||||
src/Makefile | 42 ++++++++++++++++++++++++------------------
|
src/Makefile | 43 +++++++++++++++++++++++++------------------
|
||||||
src/luaconf.h | 2 +-
|
src/luaconf.h | 2 +-
|
||||||
3 files changed, 36 insertions(+), 30 deletions(-)
|
3 files changed, 37 insertions(+), 30 deletions(-)
|
||||||
|
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@ -44,7 +44,7 @@ Subject: build system
|
|||||||
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
|
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
|
||||||
-TO_LIB= liblua.a
|
-TO_LIB= liblua.a
|
||||||
-TO_MAN= lua.1 luac.1
|
-TO_MAN= lua.1 luac.1
|
||||||
+TO_LIB= liblua$(V).la
|
+TO_LIB= liblua$(V).a
|
||||||
+TO_MAN= lua$(V).1 luac$(V).1
|
+TO_MAN= lua$(V).1 luac$(V).1
|
||||||
|
|
||||||
# Lua version and release.
|
# Lua version and release.
|
||||||
@ -76,7 +76,11 @@ Subject: build system
|
|||||||
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
||||||
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
||||||
|
|
||||||
@@ -22,25 +22,40 @@ SYSLIBS=
|
@@ -19,28 +19,44 @@ UNAME= uname
|
||||||
|
SYSCFLAGS=
|
||||||
|
SYSLDFLAGS=
|
||||||
|
SYSLIBS=
|
||||||
|
+LIBDIR=/usr/lib
|
||||||
|
|
||||||
MYCFLAGS=
|
MYCFLAGS=
|
||||||
MYLDFLAGS=
|
MYLDFLAGS=
|
||||||
@ -121,13 +125,13 @@ Subject: build system
|
|||||||
LUAC_O= luac.o
|
LUAC_O= luac.o
|
||||||
|
|
||||||
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
||||||
@@ -57,17 +72,16 @@ o: $(ALL_O)
|
@@ -57,17 +73,16 @@ o: $(ALL_O)
|
||||||
a: $(ALL_A)
|
a: $(ALL_A)
|
||||||
|
|
||||||
$(LUA_A): $(BASE_O)
|
$(LUA_A): $(BASE_O)
|
||||||
- $(AR) $@ $(BASE_O)
|
- $(AR) $@ $(BASE_O)
|
||||||
- $(RANLIB) $@
|
- $(RANLIB) $@
|
||||||
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl $(BASE_O:.o=.lo) -shared -rpath /usr/lib -version-info 9:0:4 -o $(LUA_A)
|
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl $(BASE_O:.o=.lo) -shared -rpath $(LIBDIR) -version-info 9:0:4 -o $(LUA_A)
|
||||||
|
|
||||||
$(LUA_T): $(LUA_O) $(LUA_A)
|
$(LUA_T): $(LUA_O) $(LUA_A)
|
||||||
- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
||||||
@ -135,7 +139,7 @@ Subject: build system
|
|||||||
|
|
||||||
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
||||||
- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
||||||
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LUA_A) luac.lo -o $@
|
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LUA_A) luac.lo -lm -o $@
|
||||||
|
|
||||||
test:
|
test:
|
||||||
- ./$(LUA_T) -v
|
- ./$(LUA_T) -v
|
||||||
@ -143,7 +147,7 @@ Subject: build system
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(ALL_T) $(ALL_O)
|
$(RM) $(ALL_T) $(ALL_O)
|
||||||
@@ -147,14 +161,6 @@ SunOS solaris:
|
@@ -147,14 +162,6 @@ SunOS solaris:
|
||||||
.PHONY: all $(PLATS) help test clean default o a depend echo
|
.PHONY: all $(PLATS) help test clean default o a depend echo
|
||||||
|
|
||||||
# Compiler modules may use special flags.
|
# Compiler modules may use special flags.
|
||||||
|
@ -10,6 +10,7 @@ Sun Apr 30 12:22:03 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
|||||||
- luabugs10.patch
|
- luabugs10.patch
|
||||||
- luabugs11.patch
|
- luabugs11.patch
|
||||||
- luabugs2.patch
|
- luabugs2.patch
|
||||||
|
- luabugs3.patch
|
||||||
- luabugs4.patch
|
- luabugs4.patch
|
||||||
- luabugs5.patch
|
- luabugs5.patch
|
||||||
- luabugs6.patch
|
- luabugs6.patch
|
||||||
|
16
lua54.spec
16
lua54.spec
@ -44,9 +44,6 @@ Patch1: attrib_test.patch
|
|||||||
Patch2: files_test.patch
|
Patch2: files_test.patch
|
||||||
Patch3: main_test.patch
|
Patch3: main_test.patch
|
||||||
Patch6: shared_link.patch
|
Patch6: shared_link.patch
|
||||||
# PATCH-FIX-UPSTREAM luabugsX.patch https://www.lua.org/bugs.html#5.4.4-X
|
|
||||||
# Patch9: luabugs3.patch
|
|
||||||
#
|
|
||||||
%if "%{flavor}" == "test"
|
%if "%{flavor}" == "test"
|
||||||
BuildRequires: lua54
|
BuildRequires: lua54
|
||||||
%else
|
%else
|
||||||
@ -155,7 +152,7 @@ cat doc/luac.1 | sed 's/TH LUAC 1/TH LUAC%{major_version} 1/' > doc/luac%{major_
|
|||||||
%build
|
%build
|
||||||
sed -i -e "s@lib/lua/@%{_lib}/lua/@g" src/luaconf.h
|
sed -i -e "s@lib/lua/@%{_lib}/lua/@g" src/luaconf.h
|
||||||
make linux-readline %{_smp_mflags} VERBOSE=1 -C src \
|
make linux-readline %{_smp_mflags} VERBOSE=1 -C src \
|
||||||
CC="cc" \
|
CC="cc" LIBDIR="%{_libdir}" \
|
||||||
MYCFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE -fPIC -DLUA_COMPAT_MODULE" \
|
MYCFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE -fPIC -DLUA_COMPAT_MODULE" \
|
||||||
V=%{major_version} \
|
V=%{major_version} \
|
||||||
LIBTOOL="libtool --quiet"
|
LIBTOOL="libtool --quiet"
|
||||||
@ -164,7 +161,8 @@ make linux-readline %{_smp_mflags} VERBOSE=1 -C src \
|
|||||||
%make_install \
|
%make_install \
|
||||||
LIBTOOL="libtool --quiet" \
|
LIBTOOL="libtool --quiet" \
|
||||||
INSTALL_TOP="%{buildroot}%{_prefix}" \
|
INSTALL_TOP="%{buildroot}%{_prefix}" \
|
||||||
INSTALL_LIB="%{buildroot}%{_libdir}"
|
INSTALL_LIB="%{buildroot}%{_libdir}" \
|
||||||
|
INSTALL_MAN="%{buildroot}%{_mandir}/man1"
|
||||||
|
|
||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
|
|
||||||
@ -194,6 +192,14 @@ for file in lua luac ; do
|
|||||||
ln -sf "%{_sysconfdir}/alternatives/${file}.1%{ext_man}" "%{buildroot}%{_mandir}/man1/${file}.1%{ext_man}"
|
ln -sf "%{_sysconfdir}/alternatives/${file}.1%{ext_man}" "%{buildroot}%{_mandir}/man1/${file}.1%{ext_man}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# lrwxrwxrwx. 1 abuild abuild 27 May 3 21:50 liblua.so -> /etc/alternatives/liblua.so
|
||||||
|
# lrwxrwxrwx. 1 abuild abuild 18 May 3 21:50 liblua.so.5.4 -> liblua5.4.so.5.4.0
|
||||||
|
# -rw-r--r--. 1 abuild abuild 30352 May 3 21:50 liblua5.4.a
|
||||||
|
# lrwxrwxrwx. 1 abuild abuild 18 May 3 21:50 liblua5.4.so.0 -> liblua5.4.so.5.4.0
|
||||||
|
# lrwxrwxrwx. 1 abuild abuild 18 May 3 21:50 liblua5.4.so.5.4 -> liblua5.4.so.5.4.0
|
||||||
|
# drwxr-xr-x. 1 abuild abuild 6 May 3 21:50 lua
|
||||||
|
# drwxr-xr-x. 1 abuild abuild 30 May 3 21:50 pkgconfig
|
||||||
|
|
||||||
# Compat link with older unprefixed library and with soname 0 from deb/etc
|
# Compat link with older unprefixed library and with soname 0 from deb/etc
|
||||||
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.%{major_version}
|
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.%{major_version}
|
||||||
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.0
|
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.0
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
From c764ca71a639f5585b5f466bea25dc42b855a4b0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
|
|
||||||
Date: Mon, 25 Apr 2022 14:42:51 -0300
|
|
||||||
Subject: [PATCH] Bug: Wrong code generation in bitwise operations
|
|
||||||
|
|
||||||
---
|
|
||||||
src/lcode.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/src/lcode.c
|
|
||||||
+++ b/src/lcode.c
|
|
||||||
@@ -1531,7 +1531,7 @@ static void codecommutative (FuncState *
|
|
||||||
static void codebitwise (FuncState *fs, BinOpr opr,
|
|
||||||
expdesc *e1, expdesc *e2, int line) {
|
|
||||||
int flip = 0;
|
|
||||||
- if (e1->k == VKINT) {
|
|
||||||
+ if (e1->k == VKINT && luaK_exp2K(fs, e1)) {
|
|
||||||
swapexps(e1, e2); /* 'e2' will be the constant operand */
|
|
||||||
flip = 1;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user