| Message ID | 0b4dabed3345944da878326baed133dab8c8af5b.1769845858.git.yoann.congal@smile.fr |
|---|---|
| State | New |
| Headers | show |
| Series | [whinlatter,01/22] oeqa/gitarchive: Fix git push URL parameter | expand |
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information: --- Testing patch /home/patchtest/share/mboxes/whinlatter-05-22-mesa-fix-build-error-with-llvmpipe-gallium-driver.patch FAIL: test Signed-off-by presence: A patch file has been added without a Signed-off-by tag: '0001-gallivm-support-LLVM-21.patch' (test_patch.TestPatch.test_signed_off_by_presence) PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format) PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence) PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format) PASS: test author valid (test_mbox.TestMbox.test_author_valid) PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence) PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags) PASS: test mbox format (test_mbox.TestMbox.test_mbox_format) PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade) PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format) PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length) PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list) SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint) SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format) SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint) SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head) --- Please address the issues identified and submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
Le sam. 31 janv. 2026 à 08:56, Yoann Congal <yoann.congal@smile.fr> a écrit : > From: João Marcos Costa <joaomarcos.costa@bootlin.com> > > For RISC-V, and if the PACKAGECONFIG 'gallium-llvm' is enabled, mesa's > do_compile fails due to a change in setObjectLinkingLayerCreator's > signature. This change was first included in LLVM v21. > > This issue is further described below: > https://gitlab.freedesktop.org/mesa/mesa/-/issues/13852 > > Backport the fix - from upstream - to Whinlatter. > > Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com> > Signed-off-by: Yoann Congal <yoann.congal@smile.fr> > --- > .../files/0001-gallivm-support-LLVM-21.patch | 56 +++++++++++++++++++ > meta/recipes-graphics/mesa/mesa.inc | 1 + > 2 files changed, 57 insertions(+) > create mode 100644 > meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch > > diff --git > a/meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch > b/meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch > new file mode 100644 > index 00000000000..cf3bdd36cf9 > --- /dev/null > +++ b/meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch > @@ -0,0 +1,56 @@ > +From cd129dbf8af2d16b1243f2ce287ff69c6a5dc557 Mon Sep 17 00:00:00 2001 > +From: no92 <no92.mail@gmail.com> > +Date: Wed, 27 Aug 2025 16:02:31 +0200 > +Subject: gallivm: support LLVM 21 > + > +LLVM PR#146819 changed the signature of `setObjectLinkingLayerCreator`, > +dropping the Triple argument. The PR was first included in the LLVM 21 > +series, and the new signature is gated behind a version check for that. > + > +`LLVMOrcThreadSafeContextGetContext` was removed in LLVM commit b18e5b6, > +and the ORC examples in the LLVM tree seem to just create a context > +instead, which we replicate here. > + > +With this commit, mesa successfully builds the llvmpipe gallium driver > +on riscv64 with LLVM 21.1.0. > + > +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13785 > +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13852 > + > +Reviewed-by: David Heidelberg <david@ixit.cz> > +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37027 > > > + > +Upstream-Status: Backport [ > https://cgit.freedesktop.org/mesa/mesa/commit/?id=cd129dbf8af2d16b1243f2ce287ff69c6a5dc557 > ] > João, patchtest is right, this patch is missing your signed-off-by. (Patchtest must have been down when you first sent this) Can you send a v2 with it? Thanks! > +--- > + src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 7 ++++++- > + 1 file changed, 6 insertions(+), 1 deletion(-) > + > +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp > b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp > +index 6651ea439da..e5d8e461dd6 100644 > +--- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp > ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp > +@@ -339,7 +339,12 @@ LPJit::LPJit() :jit_dylib_count(0) { > + .setJITTargetMachineBuilder(std::move(JTMB)) > + #ifdef USE_JITLINK > + .setObjectLinkingLayerCreator( > ++#if LLVM_VERSION_MAJOR >= 21 > ++ /* LLVM 21 removed the Triple argument */ > ++ [&](ExecutionSession &ES) { > ++#else > + [&](ExecutionSession &ES, const llvm::Triple &TT) { > ++#endif > + return std::make_unique<ObjectLinkingLayer>( > + ES, > ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create())); > + }) > +@@ -551,7 +556,7 @@ init_gallivm_state(struct gallivm_state *gallivm, > const char *name, > + gallivm->cache = cache; > + > + gallivm->_ts_context = context->ref; > +- gallivm->context = LLVMOrcThreadSafeContextGetContext(context->ref); > ++ gallivm->context = LLVMContextCreate(); > + > + gallivm->module_name = LPJit::get_unique_name(name); > + gallivm->module = > LLVMModuleCreateWithNameInContext(gallivm->module_name, > +-- > +cgit v1.2.3 > + > diff --git a/meta/recipes-graphics/mesa/mesa.inc > b/meta/recipes-graphics/mesa/mesa.inc > index cf2c2a57a07..d880673f273 100644 > --- a/meta/recipes-graphics/mesa/mesa.inc > +++ b/meta/recipes-graphics/mesa/mesa.inc > @@ -17,6 +17,7 @@ PE = "2" > SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ > file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch > \ > > file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \ > + file://0001-gallivm-support-LLVM-21.patch \ > " > > SRC_URI[sha256sum] = > "097842f3e49d996868b38688db87b006f7d4541e93ce86d2f341d8b3e7be7c93" >
diff --git a/meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch b/meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch new file mode 100644 index 00000000000..cf3bdd36cf9 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-gallivm-support-LLVM-21.patch @@ -0,0 +1,56 @@ +From cd129dbf8af2d16b1243f2ce287ff69c6a5dc557 Mon Sep 17 00:00:00 2001 +From: no92 <no92.mail@gmail.com> +Date: Wed, 27 Aug 2025 16:02:31 +0200 +Subject: gallivm: support LLVM 21 + +LLVM PR#146819 changed the signature of `setObjectLinkingLayerCreator`, +dropping the Triple argument. The PR was first included in the LLVM 21 +series, and the new signature is gated behind a version check for that. + +`LLVMOrcThreadSafeContextGetContext` was removed in LLVM commit b18e5b6, +and the ORC examples in the LLVM tree seem to just create a context +instead, which we replicate here. + +With this commit, mesa successfully builds the llvmpipe gallium driver +on riscv64 with LLVM 21.1.0. + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13785 +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13852 + +Reviewed-by: David Heidelberg <david@ixit.cz> +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37027> + +Upstream-Status: Backport [https://cgit.freedesktop.org/mesa/mesa/commit/?id=cd129dbf8af2d16b1243f2ce287ff69c6a5dc557] +--- + src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp +index 6651ea439da..e5d8e461dd6 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp +@@ -339,7 +339,12 @@ LPJit::LPJit() :jit_dylib_count(0) { + .setJITTargetMachineBuilder(std::move(JTMB)) + #ifdef USE_JITLINK + .setObjectLinkingLayerCreator( ++#if LLVM_VERSION_MAJOR >= 21 ++ /* LLVM 21 removed the Triple argument */ ++ [&](ExecutionSession &ES) { ++#else + [&](ExecutionSession &ES, const llvm::Triple &TT) { ++#endif + return std::make_unique<ObjectLinkingLayer>( + ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create())); + }) +@@ -551,7 +556,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name, + gallivm->cache = cache; + + gallivm->_ts_context = context->ref; +- gallivm->context = LLVMOrcThreadSafeContextGetContext(context->ref); ++ gallivm->context = LLVMContextCreate(); + + gallivm->module_name = LPJit::get_unique_name(name); + gallivm->module = LLVMModuleCreateWithNameInContext(gallivm->module_name, +-- +cgit v1.2.3 + diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index cf2c2a57a07..d880673f273 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -17,6 +17,7 @@ PE = "2" SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \ + file://0001-gallivm-support-LLVM-21.patch \ " SRC_URI[sha256sum] = "097842f3e49d996868b38688db87b006f7d4541e93ce86d2f341d8b3e7be7c93"