diff options
-rw-r--r-- | src/luajit.mk | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/luajit.mk b/src/luajit.mk index 330336c..1dc5b87 100644 --- a/src/luajit.mk +++ b/src/luajit.mk @@ -12,13 +12,19 @@ $(PKG)_DEPS := gcc define $(PKG)_BUILD $(MAKE) -C '$(1)' -j '$(JOBS)' \ - HOST_CC="gcc -m32" CROSS=$(TARGET)- \ + HOST_CC='gcc -m32' CROSS='$(TARGET)-' \ TARGET_SYS=Windows BUILDMODE=static \ PREFIX='$(PREFIX)/$(TARGET)' \ FILE_T=luajit.exe \ install endef -$(PKG)_BUILD_x86_64-w64-mingw32 = +# gcc -m64 is only available on 64-bit machines +ifneq (,$(findstring 64,$(BUILD))) + $(PKG)_BUILD_x86_64-w64-mingw32 = \ + $(subst 'gcc -m32','gcc -m64',$($(PKG)_BUILD)) +else + $(PKG)_BUILD_x86_64-w64-mingw32 = +endif $(PKG)_BUILD_SHARED = |