The inbuilt patch 0007-llvm-allow-env-override-of-exe-path.patch does not work. I corrected the patch according to this: new patch.
But that was not enough.
Mesa sets env variables itself and does not need llvm-config wrapper, only patch.
Adding echos to mesa's do_configure showed, that YOCTO_ALTERNATE_EXE_PATH was set incorrectly, as ...recipe-sysroot/usr/lib64/llvm-config, not as ...recipe-sysroot/usr/lib64/llvm10.0.1/llvm-config
Redefining YOCTO_ALTERNATE_EXE_PATH in mesa_20.0.2.bbappend in my layer (that is above meta-clang) solved the problem.
P.S. old patch does not work with redefinition.
P.P.S. in my case gcc can't build mesa+llvmpipe, clang toolchain worked.
While do_configure meson fails with:
The problem is similar to https://bugzilla.yoctoproject.org/show_bug.cgi?id=13937.
The inbuilt patch
0007-llvm-allow-env-override-of-exe-path.patch
does not work. I corrected the patch according to this: new patch. But that was not enough.According to mesa.inc:
Mesa sets env variables itself and does not need llvm-config wrapper, only patch. Adding echos to mesa's do_configure showed, that YOCTO_ALTERNATE_EXE_PATH was set incorrectly, as
...recipe-sysroot/usr/lib64/llvm-config
, not as...recipe-sysroot/usr/lib64/llvm10.0.1/llvm-config
Redefining YOCTO_ALTERNATE_EXE_PATH in mesa_20.0.2.bbappend in my layer (that is above meta-clang) solved the problem.P.S. old patch does not work with redefinition. P.P.S. in my case gcc can't build mesa+llvmpipe, clang toolchain worked.