Skip to content

Commit

Permalink
luajit: fix aarch64 cross-compile
Browse files Browse the repository at this point in the history
Unlike CMAKE_SYSTEM_PROCESSOR which identifies aarch64
as a valid architecture, luajit does not recognize it.
luajit defines aarch64 as arm64.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
  • Loading branch information
jugurthab authored and RomainNaour committed Aug 4, 2019
1 parent 9518a5b commit 6f9f5d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lua/CMakeLists.txt
Expand Up @@ -13,9 +13,15 @@ if (LUAJIT_LIBRARIES AND LUAJIT)
DEPENDS ${SRC_LUA} ${CMAKE_CURRENT_SOURCE_DIR}/squishy
)

if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
SET (LUAJIT_TARGET_ARCH arm64)
else()
SET (LUAJIT_TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR})
endif()

ADD_CUSTOM_COMMAND(
OUTPUT bcc.o
COMMAND ${LUAJIT} -bg bcc.lua bcc.o
COMMAND ${LUAJIT} -bg bcc.lua -a ${LUAJIT_TARGET_ARCH} bcc.o
DEPENDS bcc.lua
)

Expand Down

0 comments on commit 6f9f5d9

Please sign in to comment.