tce-load -i compiletc readline-dev http://www.lua.org/ftp/lua-5.3.5.tar.gz http://www.linuxfromscratch.org/patches/blfs/svn/lua-5.3.5-shared_library-1.patch cd lua-5.3.5 cat > lua.pc << "EOF" V=5.3 R=5.3.5 prefix=/usr/local INSTALL_BIN=${prefix}/bin INSTALL_INC=${prefix}/include/lua5.3 INSTALL_LIB=${prefix}/lib INSTALL_MAN=${prefix}/share/man/man1 INSTALL_LMOD=${prefix}/share/lua/${V} INSTALL_CMOD=${prefix}/lib/lua/${V} exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include/lua5.3 Name: Lua Description: An Extensible Extension Language Version: ${R} Requires: Libs: -L${libdir} -llua -lm Cflags: -I${includedir} EOF patch -Np1 -i ../lua-5.3.5-shared_library-1.patch edit Makefile INSTALL_INC= $(INSTALL_TOP)/include/lua5.3 edit src/Makefile CC= gcc -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -std=gnu99 CFLAGS= -fPIC -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1 $(SYSCFLAGS) $(MYCFLAGS) $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -lncursesw" make linux [0m 16.22s] sudo make TO_LIB="liblua.so liblua.so.5.3 liblua.so.5.3.5" INSTALL_DATA="cp -d" install sudo install -m644 -D lua.pc /usr/local/lib/pkgconfig/lua.pc