Re: [dpdk-dev] [PATCH v4 1/3] build: add aarch64 clang to meson cross-compile
From: Thomas Monjalon <hidden>
Date: 2021-01-19 16:08:12
From: Thomas Monjalon <hidden>
Date: 2021-01-19 16:08:12
19/01/2021 09:33, Juraj Linkeš:
Create meson cross-file arm64_armv8_linux_clang_ubuntu1804.
Why is it specific to Ubuntu 18.04? I don't want to add specifc cross files per distributions.
Use clang/LLVM toolchain with sysroot pointing to gcc cross stdlib. The sysroot path must be in the cross-file so that Clang can find the proper headers: * setting CFLAGS, LDFLAGS or -Dc_args, -Dc_link_args doesn't affect cross builds (only native builds). Support added in 0.51.0. * setting pkg-config vars only affects lib searching, not includes * splitting the cross-file into two (one with clang info, one with paths) doesn't work. Support added in 0.52.0.
I don't understand the explanations above. Please explain what is the bug and how it is fixed. [...]
+c_args = ['-target', 'aarch64-linux-gnu', '--sysroot', '/usr/aarch64-linux-gnu'] +c_link_args = ['-target', 'aarch64-linux-gnu', '-fuse-ld=lld', '--gcc-toolchain=/usr']