[dpdk-dev] [PATCH v3 1/3] build: add aarch64 clang to meson cross-compile

Ruifeng Wang Ruifeng.Wang at arm.com
Tue Dec 22 10:58:55 CET 2020


> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Juraj Linke?
> Sent: Friday, October 2, 2020 5:38 PM
> To: thomas at monjalon.net; david.marchand at redhat.com;
> aconole at redhat.com; maicolgabriel at hotmail.com
> Cc: dev at dpdk.org; Juraj Linkeš <juraj.linkes at pantheon.tech>
> Subject: [dpdk-dev] [PATCH v3 1/3] build: add aarch64 clang to meson cross-
> compile
> 
> Create meson cross file arm64_armv8_linux_clang_ubuntu1804.
> Use clang/LLVM toolchain with sysroot pointing to gcc cross stdlib.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes at pantheon.tech>
> ---
>  config/arm/arm64_armv8_linux_clang_ubuntu1804 | 20
> +++++++++++++++++++
>  1 file changed, 20 insertions(+)
>  create mode 100644 config/arm/arm64_armv8_linux_clang_ubuntu1804
> 
> diff --git a/config/arm/arm64_armv8_linux_clang_ubuntu1804
> b/config/arm/arm64_armv8_linux_clang_ubuntu1804
> new file mode 100644
> index 000000000..67f475eb0
> --- /dev/null
> +++ b/config/arm/arm64_armv8_linux_clang_ubuntu1804
> @@ -0,0 +1,20 @@
> +[binaries]
> +c = 'clang'
> +cpp = 'clang++'
> +ar = 'llvm-ar'
> +strip = 'llvm-strip'
> +llvm-config = 'llvm-config'
> +pcap-config = 'llvm-config'
> +pkgconfig = 'aarch64-linux-gnu-pkg-config'
> +
> +[host_machine]
> +system = 'linux'
> +cpu_family = 'aarch64'
> +cpu = 'armv8-a'
> +endian = 'little'
> +
> +[properties]
> +implementor_id = 'generic'
> +implementor_pn = 'default'
> +c_args = ['-target', 'aarch64-linux-gnu', '--sysroot',
> +'/usr/aarch64-linux-gnu', '--gcc-toolchain=/usr'] c_link_args =
> +['-target', 'aarch64-linux-gnu', '-fuse-ld=lld']
> --
> 2.20.1

I understand specific flags are needed by clang to do cross compiling.
Path to gnu libc which is required could be different on some other systems.
The cross file works on Ubuntu, and could be referred to by other systems.

Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>


More information about the dev mailing list