diff -Nru lua5.3-5.3.1/debian/changelog lua5.3-5.3.1/debian/changelog --- lua5.3-5.3.1/debian/changelog 2015-08-14 12:18:42.000000000 +0000 +++ lua5.3-5.3.1/debian/changelog 2016-04-12 19:45:05.000000000 +0000 @@ -1,3 +1,11 @@ +lua5.3 (5.3.1-1ubuntu1) xenial; urgency=medium + + * debian/patches/0001-build-system.patch: Build *and* link with g++. + Fixes segfault in build inside wgenops.c:105 at main() exit. + * d/control: update-maintainer + + -- Barry Warsaw Tue, 12 Apr 2016 15:42:42 -0400 + lua5.3 (5.3.1-1) unstable; urgency=medium * Initial release. (Closes: #775565) diff -Nru lua5.3-5.3.1/debian/control lua5.3-5.3.1/debian/control --- lua5.3-5.3.1/debian/control 2015-08-14 12:18:42.000000000 +0000 +++ lua5.3-5.3.1/debian/control 2016-04-12 19:45:05.000000000 +0000 @@ -1,7 +1,8 @@ Source: lua5.3 Section: interpreters Priority: optional -Maintainer: Enrico Tassi +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Enrico Tassi Uploaders: Build-Depends: debhelper (>= 9), quilt (>= 0.40), libtool-bin, libreadline-dev Standards-Version: 3.9.6 diff -Nru lua5.3-5.3.1/debian/patches/0001-build-system.patch lua5.3-5.3.1/debian/patches/0001-build-system.patch --- lua5.3-5.3.1/debian/patches/0001-build-system.patch 2015-08-14 12:18:42.000000000 +0000 +++ lua5.3-5.3.1/debian/patches/0001-build-system.patch 2016-04-12 19:45:05.000000000 +0000 @@ -7,8 +7,6 @@ src/Makefile | 31 +++++++++++++++++++------------ 2 files changed, 33 insertions(+), 23 deletions(-) -diff --git a/Makefile b/Makefile -index 7fa91c8..e669e78 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ @@ -20,7 +18,7 @@ # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= # Your platform. See PLATS for possible values. -@@ -10,19 +12,20 @@ PLAT= none +@@ -10,19 +12,20 @@ # so take care if INSTALL_TOP is not an absolute path. See the local target. # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. @@ -46,7 +44,7 @@ # # If you don't have "install" you can use "cp" instead. # INSTALL= cp -p -@@ -39,10 +42,10 @@ RM= rm -f +@@ -39,10 +42,10 @@ PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris # What to install. @@ -60,7 +58,7 @@ # Lua version and release. V= 5.3 -@@ -52,16 +55,16 @@ R= $V.0 +@@ -52,16 +55,16 @@ all: $(PLAT) $(PLATS) clean: @@ -80,8 +78,6 @@ cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) uninstall: -diff --git a/src/Makefile b/src/Makefile -index 2e7a412..993ff15 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,8 +6,10 @@ @@ -90,14 +86,14 @@ -CC= gcc -std=gnu99 -CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) -+CC= $(CCACHE)gcc -std=gnu99 ++CC= $(CCACHE)g++ +CXX= $(CCACHE)g++ +CFLAGS= -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) +CXXFLAGS= -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCXXFLAGS) LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) LIBS= -lm $(SYSLIBS) $(MYLIBS) -@@ -19,16 +21,21 @@ SYSCFLAGS= +@@ -19,16 +21,21 @@ SYSLDFLAGS= SYSLIBS= @@ -123,7 +119,7 @@ CORE_O= lapi.o lcode.o lctype.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,10 +43,10 @@ LIB_O= lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o \ +@@ -36,10 +43,10 @@ lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) @@ -136,7 +132,7 @@ LUAC_O= luac.o ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) -@@ -56,14 +63,14 @@ o: $(ALL_O) +@@ -56,14 +63,14 @@ a: $(ALL_A) $(LUA_A): $(BASE_O)