commit:     a770c62efb886abdfd8fa52fbf312362ab62bf21
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  5 12:39:40 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec  8 16:56:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a770c62e

media-libs/mesa: Disable EH/RTTI on LLVM 16+

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/28549
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 media-libs/mesa/mesa-22.3.0.ebuild | 9 +++++++++
 media-libs/mesa/mesa-9999.ebuild   | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/media-libs/mesa/mesa-22.3.0.ebuild 
b/media-libs/mesa/mesa-22.3.0.ebuild
index e121c4c2f319..f39169af89a2 100644
--- a/media-libs/mesa/mesa-22.3.0.ebuild
+++ b/media-libs/mesa/mesa-22.3.0.ebuild
@@ -410,6 +410,15 @@ multilib_src_configure() {
        use vulkan-overlay && vulkan_layers+=",overlay"
        emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
 
+       # In LLVM 16, we've switched to building LLVM with EH/RTTI disabled
+       # to match upstream defaults.  Mesa requires being built the same way.
+       # https://bugs.gentoo.org/883955
+       if [[ ${LLVM_SLOT} -ge 16 ]]; then
+               emesonargs+=(
+                       -Dcpp_rtti=false
+               )
+       fi
+
        emesonargs+=(
                $(meson_use test build-tests)
                -Dglx=$(usex X dri disabled)

diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
index e121c4c2f319..f39169af89a2 100644
--- a/media-libs/mesa/mesa-9999.ebuild
+++ b/media-libs/mesa/mesa-9999.ebuild
@@ -410,6 +410,15 @@ multilib_src_configure() {
        use vulkan-overlay && vulkan_layers+=",overlay"
        emesonargs+=(-Dvulkan-layers=${vulkan_layers#,})
 
+       # In LLVM 16, we've switched to building LLVM with EH/RTTI disabled
+       # to match upstream defaults.  Mesa requires being built the same way.
+       # https://bugs.gentoo.org/883955
+       if [[ ${LLVM_SLOT} -ge 16 ]]; then
+               emesonargs+=(
+                       -Dcpp_rtti=false
+               )
+       fi
+
        emesonargs+=(
                $(meson_use test build-tests)
                -Dglx=$(usex X dri disabled)

Reply via email to