From: Juraj Linkeš Date: Thu, 21 Jan 2021 15:51:42 +0000 (+0100) Subject: config: add aarch64 clang for Ubuntu 18.04 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3d01d65ba0d34df47c2983b9da115d25372a6323;p=dpdk.git config: add aarch64 clang for Ubuntu 18.04 Create distribution specific meson cross-file arm64_armv8_linux_clang_ubuntu1804. The file is distribution specific because it contains paths to headers and libs specific to the distribution. The clang/LLVM toolchain does not provide its own c stdlib so the paths must be supplied in some manner. In the current version of meson, v0.47.1, the only place where the paths can be specified is the cross-file. Other possibilities do not work: * setting CFLAGS, LDFLAGS only sets these for non-cross builds. * setting -Dc_args, -Dc_link_args on the command line also only sets these for non-cross builds. Support for specifying these for cross builds was added in v0.51.0 [0]. * the cross-file can't be split into generic clang cross config and distribution specific config. Support added in v0.52.0 [1]. [0] https://mesonbuild.com/Builtin-options.html#specifying-options-per-machine [1] https://mesonbuild.com/Machine-files.html#loading-multiple-machine-files Signed-off-by: Juraj Linkeš Reviewed-by: Ruifeng Wang --- diff --git a/config/arm/arm64_armv8_linux_clang_ubuntu1804 b/config/arm/arm64_armv8_linux_clang_ubuntu1804 new file mode 100644 index 0000000000..aa5ee01320 --- /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'] +c_link_args = ['-target', 'aarch64-linux-gnu', '-fuse-ld=lld', '--gcc-toolchain=/usr']