From adb4091293db2e5e4caafd2f20233598ae5c6b28 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Wed, 17 Jan 2024 20:29:42 +1300 Subject: [PATCH] workaround esoteric gcc behaviour on Linux ld would fail to find Lua symbols in liblua.a, the solution is to put all object files before static libraries on the command line. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9a463dd..4bea55f 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ CJSON_CFLAGS = -Wno-sign-compare -Wno-unused-function all: csto libcallisto.a csto: ${LIBS} csto.o - ${CC} -o $@ libcallisto.a liblua.a csto.o ${LDFLAGS} + ${CC} -o $@ csto.o libcallisto.a liblua.a ${LDFLAGS} libcallisto.a: liblua.a ${CJSON_OBJS} ${OBJS} ar cr $@ ${OBJS} ${CJSON_OBJS}