<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
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++.<br>
Important is that I have compiler-rt checked out to the
llvm/projects folder.<br>
"cmake -G 'Unix Makefiles' ..." is used to configure the build
folder.<br>
<br>
The problem: cmake fails to configure. <br>
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.<br>
<br>
I tracked down where -m64 was originating from and found the
following in compiler-rt/CMakeLists.txt:<br>
<br>
<big><font face="Courier 10 Pitch"><small>if (NOT MSVC)<br>
set(TARGET_64_BIT_CFLAGS "-m64")<br>
set(TARGET_32_BIT_CFLAGS "-m32")<br>
else()<br>
set(TARGET_64_BIT_CFLAGS "")<br>
set(TARGET_32_BIT_CFLAGS "")<br>
endif()</small></font></big><br>
<br>
After the line with -m64 is commented out, cmake can complete the
configuration and I am able to cross compile the whole LLVM.<br>
<br>
Could you please advise if this is a known problem or anything more
appropriate then mere commenting can be done to overcome this?<br>
<br>
Thank you.<br>
<br>
Kind regards,<br>
Oleg<br>
</body>
</html>