.travis.yml: Link Lua 5.3 correctly

This makes sure that the liblua.so that we built actually depends on the
libraries that it needs (libm and libdl). Previously we already tried
this, but specified "-ldl" at the beginning of the command line. Since
nothing needed this library yet, the linker just ignored it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-06-13 15:37:48 +02:00
parent c5e830cd60
commit 93d5007c20
1 changed files with 3 additions and 1 deletions

View File

@ -54,8 +54,10 @@ install:
if [[ "$LUA" == "5.3" ]]; then
wget http://www.lua.org/ftp/lua-5.3.3.tar.gz -O lua.tar.gz
tar -xvzf lua.tar.gz
(echo '#!/bin/sh' ; echo 'set -x' ; echo 'gcc -shared -Wl,--no-undefined -o "$@" -ldl -lm') > /tmp/myar
chmod a+x /tmp/myar
(cd lua-5.3.3/src \
&& make SYSCFLAGS="-DLUA_USE_LINUX -ULUA_COMPAT_5_2 -DLUA_USE_APICHECK" SYSLIBS="-Wl,-E -ldl -lreadline" LUA_A=liblua.so MYCFLAGS="-fPIC" RANLIB=: AR="gcc -shared -ldl -o" liblua.so \
&& make SYSCFLAGS="-DLUA_USE_LINUX -ULUA_COMPAT_5_2 -DLUA_USE_APICHECK" SYSLIBS="-Wl,-E -ldl -lreadline" LUA_A=liblua.so MYCFLAGS="-fPIC" RANLIB=: AR="/tmp/myar" liblua.so \
&& cd .. \
&& sudo make INSTALL_TOP=/usr/ INSTALL_INC=${LUAINCLUDE} TO_LIB=liblua.so linux install)
elif [[ "$LUANAME" == "luajit-2.0" ]]; then