From 3b1a2de0ae0a7f8e25e348df43213fd6bf2ef0d4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 2 May 2026 20:12:08 +0900 Subject: test: test lua compilation --- tests/lua.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/lua.sh (limited to 'tests/lua.sh') diff --git a/tests/lua.sh b/tests/lua.sh new file mode 100644 index 0000000..7c96e08 --- /dev/null +++ b/tests/lua.sh @@ -0,0 +1,30 @@ +LUA_REPO=https://github.com/lua/lua.git +LUA_TAG=v5.5.0 + +if [[ ! -d ../../lua ]]; then + git clone --depth=1 --revision="$LUA_TAG" "$LUA_REPO" ../../lua +fi + +cat > makefile.patch <<'EOF' +--- a/makefile ++++ b/makefile +@@ -76,8 +76,8 @@ MYLDFLAGS= -Wl,-E + MYLIBS= -ldl + + +-CC= gcc +-CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native ++CC= ../../build/ducc ++CFLAGS+= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native + AR= ar rc + RANLIB= ranlib + RM= rm -f +EOF + +( + cd ../../lua + if ! git apply --reverse --check < ../tmp/lua/makefile.patch 2>/dev/null; then + git apply < ../tmp/lua/makefile.patch + fi + make +) -- cgit v1.3.1