[llvmlinux] Unmatching Arch String for Aarch64/arm64

Behan Webster behanw at converseincode.com
Thu Jan 30 17:46:16 UTC 2014


On 01/29/14 18:17, zhaoshiz at codeaurora.org wrote:
> Hi,
>
> Please direct me to the right place for filing a bug if needed.
>
> It seems linux kernel use arm64 as the arch string for 64-bit ARM. But
> llvm uses aarch64. As a result, when using native clang, build fails by
> hitting this error: "Your native clang does not have arm64 support".
>
> I tried to substitute arm64 with aarch64 in clang-native.mk but had no luck.
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CC=clang

The ARCH is for specifying the kernel arch. You specify the tool arch
with CROSS_COMPILE. Though you may need to add "-gcc-toolchain" to your
CC if you don't have the cross compiler in your path

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CC="clang
-gcc-toolchain path/to/cross"

You can checkout the example of how it's used in our vexpress64 target
in the LLVMLinux build system.

Works great.

Behan

-- 
Behan Webster
behanw at converseincode.com



More information about the LLVMLinux mailing list