From 3d01d65ba0d34df47c2983b9da115d25372a6323 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Juraj=20Linke=C5=A1?= Date: Thu, 21 Jan 2021 16:51:42 +0100 Subject: [PATCH] config: add aarch64 clang for Ubuntu 18.04 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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 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'] -- 2.20.1