[LLVMdev] [compiler-rt] cmake fails to configure for AArh64

Oleg Ranevskyy llvm.mail.list at gmail.com
Wed Sep 24 06:05:34 PDT 2014


Hi,

I am trying to cross compile LLVM/clang for AArch64 on an X86_64 Linux 
host using aarch64-linux-gnu-gcc / aarch64-linux-gnu-g++.
Important is that I have compiler-rt checked out to the llvm/projects 
folder.
"cmake -G 'Unix Makefiles' ..." is used to configure the build folder.

The problem: cmake fails to configure.
The reason: cmake passes the -m64 option to aarch64-linux-gnu-g++, which 
the compiler does not need and doesn't understand as the option is 
redundant for AArch64.

I tracked down where -m64 was originating from and found the following 
in compiler-rt/CMakeLists.txt:

if (NOT MSVC)
   set(TARGET_64_BIT_CFLAGS "-m64")
   set(TARGET_32_BIT_CFLAGS "-m32")
else()
   set(TARGET_64_BIT_CFLAGS "")
   set(TARGET_32_BIT_CFLAGS "")
endif()

After the line with -m64 is commented out, cmake can complete the 
configuration and I am able to cross compile the whole LLVM.

Could you please advise if this is a known problem or anything more 
appropriate then mere commenting can be done to overcome this?

Thank you.

Kind regards,
Oleg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140924/18ae99b0/attachment.html>


More information about the llvm-dev mailing list