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.
This commit is contained in:
Ingo Paschke
2026-06-04 07:17:35 -04:00
committed by nhmall
parent 006867cf0d
commit 63cb04f410
+4
View File
@@ -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