title: cross compile for meson-mali?
body: <p>I'm trying to compile meson-mali by bitbake
  <a href="https://github.com/opendreambox/opendreambox/tree/pyro/meta-dreambox/recipes-graphics/meson-mali" rel="nofollow noreferrer">https://github.com/opendreambox/opendreambox/tree/pyro/meta-dreambox/recipes-graphics/meson-mali</a>
  on my ubuntu 21.04 with latest kernel (5.11.0-34-generic)
  But I have got this error ..</p>
  <pre><code>|                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/linux/atomic.h:4,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_tlstream.c:24:
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_tlstream.c: In function 'kbase_tlstream_acquire':
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/arch/arm64/include/asm/atomic_ll_sc.h:259:9: error: array subscript 'long unsigned int[0]' is partly outside array bounds of 'atomic_t[1]' [-Werror=array-bounds]
  |   259 |         asm volatile(                                                   \
  |       |         ^~~
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/arch/arm64/include/asm/atomic_ll_sc.h:292:1: note: in expansion of macro '__CMPXCHG_CASE'
  |   292 | __CMPXCHG_CASE(w,  ,  mb_4, dmb ish,  , l, &quot;memory&quot;)
  |       | ^~~~~~~~~~~~~~
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_tlstream.c:598:10: note: while referencing 'kbase_tlstream_enabled'
  |   598 | atomic_t kbase_tlstream_enabled = {0};
  |       |          ^~~~~~~~~~~~~~~~~~~~~~
  | In file included from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/arch/arm64/include/asm/atomic.h:36,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/linux/atomic.h:4,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_tlstream.c:24:
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/arch/arm64/include/asm/atomic_ll_sc.h:259:9: error: array subscript 'long unsigned int[0]' is partly outside array bounds of 'atomic_t[1]' [-Werror=array-bounds]
  |   259 |         asm volatile(                                                   \
  |       |         ^~~
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/arch/arm64/include/asm/atomic_ll_sc.h:292:1: note: in expansion of macro '__CMPXCHG_CASE'
  |   292 | __CMPXCHG_CASE(w,  ,  mb_4, dmb ish,  , l, &quot;memory&quot;)
  |       | ^~~~~~~~~~~~~~
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_tlstream.c:598:10: note: while referencing 'kbase_tlstream_enabled'
  |   598 | atomic_t kbase_tlstream_enabled = {0};
  |       |          ^~~~~~~~~~~~~~~~~~~~~~
  |   CC [M]  /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_debug_job_fault_backend.o
  | In file included from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/asm-generic/preempt.h:4,
  |                  from ./arch/arm64/include/generated/asm/preempt.h:1,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/linux/preempt.h:59,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/linux/spinlock.h:50,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/linux/wait.h:8,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/linux/fs.h:5,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/linux/highmem.h:4,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase.h:33,
  |                  from /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c:23:
  | In function 'check_object_size',
  |     inlined from 'copy_from_user' at /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/arch/arm64/include/asm/uaccess.h:448:3,
  |     inlined from 'kbasep_serialize_jobs_debugfs_write' at /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c:3019:6:
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/linux/thread_info.h:96:17: error: 'buf' may be used uninitialized [-Werror=maybe-uninitialized]
  |    96 |                 __check_object_size(ptr, n, to_user);
  |       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c: In function 'kbasep_serialize_jobs_debugfs_write':
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work-shared/dreamtwo/kernel-source/include/linux/thread_info.h:89:13: note: by argument 1 of type 'const void *' to '__check_object_size' declared here
  |    89 | extern void __check_object_size(const void *ptr, unsigned long n,
  |       |             ^~~~~~~~~~~~~~~~~~~
  | /home/raed/build_image/OpenPli-DM/openpli-dreambox-oe-core/build/tmp/work/dreamtwo-oe-linux/meson-mali-module-bifrost-r12p0/201901-0-gd4a30ca-r0/meson-mali-module-bifrost-r12p0-201901-0-gd4a30ca/bifrost/r12p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c:3012:14: note: 'buf' declared here
  |  3012 |         char buf[MAX_SERIALIZE_JOBS_NAME_LEN];
  |       |              ^~~
  
  </code></pre>
  <p>Any idea ?</p>