1From 7b46756a99aca7f27a45c3b99460f088570f6f53 Mon Sep 17 00:00:00 2001
2From: Romain Naour <romain.naour@smile.fr>
3Date: Wed, 17 Apr 2019 23:07:42 +0200
4Subject: [PATCH] meson: Set proper value for LIBCLC_INCLUDEDIR
5
6LIBCLC_INCLUDEDIR is the location where mesa3d OpenCL implementation
7will look for OpenCL "headers" on the target, when building the OpenCL
8kernels.
9
10The value returned by pkg-config for includedir is relevant when
11cross-compiling, on the build machine. But in this specific case, we
12really need a value that is valid on the target.
13
14Those headers are installed by the libclc package in /usr/share so
15that they are not removed by Buildroot target-finalize logic.
16
17Based on the patch for autotools provided by Valentin Korenblit.
18
19Signed-off-by: Romain Naour <romain.naour@smile.fr>
20Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
21[rebased for 20.2.0 & 20.3.0]
22---
23 src/gallium/frontends/clover/meson.build | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build
27index 62ac5f5278d..ecdeb39669c 100644
28--- a/src/gallium/frontends/clover/meson.build
29+++ b/src/gallium/frontends/clover/meson.build
30@@ -27,7 +27,7 @@
31   '-DCL_USE_DEPRECATED_OPENCL_2_0_APIS',
32   '-DCL_USE_DEPRECATED_OPENCL_2_1_APIS',
33   '-DCL_USE_DEPRECATED_OPENCL_2_2_APIS',
34-  '-DLIBCLC_INCLUDEDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'includedir')),
35+  '-DLIBCLC_INCLUDEDIR="/usr/share"',
36   '-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'libexecdir'))
37 ]
38 clover_spirv_cpp_args = []
39--
402.20.1
41
42