Use Linux cross-compiler if building for x86_64 on OS X

Even if we are building for x86_64, we still need a cross compiler to be able to
build ELF binaries.

OS X cross compilers can be installed via brew from here:
https://github.com/SergioBenitez/homebrew-osxct
This commit is contained in:
Ilya Yanok 2018-09-09 16:32:09 +02:00 committed by Kent McLeod
parent 03a07bef6e
commit a5a1efeaf5

View file

@ -34,6 +34,8 @@ if("${CROSS_COMPILER_PREFIX}" STREQUAL "")
set(CROSS_COMPILER_PREFIX "riscv32-unknown-elf-" CACHE INTERNAL "")
elseif(RISCV64)
set(CROSS_COMPILER_PREFIX "riscv64-unknown-elf-" CACHE INTERNAL "")
elseif(APPLE)
set(CROSS_COMPILER_PREFIX "x86_64-unknown-linux-gnu-" CACHE INTERNAL "")
endif()
endif()