From 63cb04f410033b31a2a427f45a4b38e376fd9bb1 Mon Sep 17 00:00:00 2001 From: Ingo Paschke Date: Thu, 4 Jun 2026 12:23:33 +0200 Subject: [PATCH] hints: keep host CC for top-level lua in cross builds LUAMAKEFLAGS uses TARGET_CC, which the cross hints override to the target compiler. The top-level liblua.a is a host-side prerequisite of the generated include/nhlua.h; the target lua is built separately under BUILD_TARGET_LUA. --- sys/unix/hints/include/cross-post.500 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/unix/hints/include/cross-post.500 b/sys/unix/hints/include/cross-post.500 index 2d6ef3546..db5eebe6f 100644 --- a/sys/unix/hints/include/cross-post.500 +++ b/sys/unix/hints/include/cross-post.500 @@ -351,6 +351,10 @@ $(TARGETPFX)giftiles.o : ../win/share/giftiles.c endif # CROSS_SHARED # ifdef CROSS +ifdef MAKEFILE_TOP +# top-level liblua.a is a host-side build; keep TARGET_CC out of it +LUAMAKEFLAGS = CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)' +endif # MAKEFILE_TOP $(TARGETPFX)hacklib.a: $(TARGETPFX)hacklib.o $(TARGET_AR) $(TARGET_ARFLAGS) $@ $(TARGETPFX)hacklib.o ifdef MAKEFILE_UTL