[v3,1/3] build: add aarch64 clang to meson cross-compile
diff mbox series

Message ID 1601631508-5307-2-git-send-email-juraj.linkes@pantheon.tech
State New
Delegated to: Thomas Monjalon
Headers show
Series
  • aarch64 clang cross compilation
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš Oct. 2, 2020, 9:38 a.m. UTC
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@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

Comments

Ruifeng Wang Dec. 22, 2020, 9:58 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Juraj Linke?
> Sent: Friday, October 2, 2020 5:38 PM
> To: thomas@monjalon.net; david.marchand@redhat.com;
> aconole@redhat.com; maicolgabriel@hotmail.com
> Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@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@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@arm.com>

Patch
diff mbox series

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']