commit:     ea3cc27f4c69cb50afd5f6786e6c56d709f48c20
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 18 02:16:17 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep 18 02:45:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea3cc27f

sys-devel/mold: control assertions with USE=debug

Still not really sure how we should handle this distro-wide but whatever.

Anyway, the assertions being enabled is how we hit #938009.

Bug: https://bugs.gentoo.org/938009
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/mold/mold-2.33.0-r1.ebuild | 5 ++++-
 sys-devel/mold/mold-9999.ebuild      | 7 +++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sys-devel/mold/mold-2.33.0-r1.ebuild 
b/sys-devel/mold/mold-2.33.0-r1.ebuild
index 257d0d263979..d9e220971d81 100644
--- a/sys-devel/mold/mold-2.33.0-r1.ebuild
+++ b/sys-devel/mold/mold-2.33.0-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake toolchain-funcs
+inherit cmake flag-o-matic toolchain-funcs
 
 DESCRIPTION="A Modern Linker"
 HOMEPAGE="https://github.com/rui314/mold";
@@ -20,6 +20,7 @@ fi
 #  - siphash ( MIT CC0-1.0 )
 LICENSE="MIT BSD-2 CC0-1.0"
 SLOT="0"
+IUSE="debug"
 
 RDEPEND="
        app-arch/zstd:=
@@ -69,6 +70,8 @@ src_prepare() {
 }
 
 src_configure() {
+       use debug || append-cppflags "-DNDEBUG"
+
        local mycmakeargs=(
                -DMOLD_ENABLE_QEMU_TESTS=OFF
                -DMOLD_LTO=OFF # Should be up to the user to decide this with 
CXXFLAGS.

diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index d13290655de3..53b3beaf330c 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake toolchain-funcs
+inherit cmake flag-o-matic toolchain-funcs
 
 DESCRIPTION="A Modern Linker"
 HOMEPAGE="https://github.com/rui314/mold";
@@ -12,7 +12,7 @@ if [[ ${PV} == 9999 ]] ; then
        inherit git-r3
 else
        SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.tar.gz"
-       KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86"
+       KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~riscv ~sparc ~x86"
 fi
 
 # mold (MIT)
@@ -20,6 +20,7 @@ fi
 #  - siphash ( MIT CC0-1.0 )
 LICENSE="MIT BSD-2 CC0-1.0"
 SLOT="0"
+IUSE="debug"
 
 RDEPEND="
        app-arch/zstd:=
@@ -65,6 +66,8 @@ src_prepare() {
 }
 
 src_configure() {
+       use debug || append-cppflags "-DNDEBUG"
+
        local mycmakeargs=(
                -DMOLD_ENABLE_QEMU_TESTS=OFF
                -DMOLD_LTO=OFF # Should be up to the user to decide this with 
CXXFLAGS.

Reply via email to