commit:     f51d8525dc6850b01616424147ba5d06c7f7d78a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  2 11:47:55 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Oct  3 06:04:08 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f51d8525

sys-libs/libomp: Ensure NDEBUG correctly

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-libs/libomp/libomp-13.0.0.9999.ebuild | 5 ++++-
 sys-libs/libomp/libomp-13.0.0.ebuild      | 5 ++++-
 sys-libs/libomp/libomp-14.0.0.9999.ebuild | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/sys-libs/libomp/libomp-13.0.0.9999.ebuild 
b/sys-libs/libomp/libomp-13.0.0.9999.ebuild
index 5adaa0dfbca..bf8f376ce98 100644
--- a/sys-libs/libomp/libomp-13.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-13.0.0.9999.ebuild
@@ -13,7 +13,7 @@ HOMEPAGE="https://openmp.llvm.org";
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
 KEYWORDS=""
-IUSE="cuda hwloc kernel_linux offload ompt test"
+IUSE="cuda debug hwloc kernel_linux offload ompt test"
 # CUDA works only with the x86_64 ABI
 REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
 RESTRICT="!test? ( test )"
@@ -66,6 +66,9 @@ pkg_setup() {
 }
 
 multilib_src_configure() {
+       # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+       use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
        local libdir="$(get_libdir)"
        local mycmakeargs=(
                -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"

diff --git a/sys-libs/libomp/libomp-13.0.0.ebuild 
b/sys-libs/libomp/libomp-13.0.0.ebuild
index 136466d1b9a..db94fb5536f 100644
--- a/sys-libs/libomp/libomp-13.0.0.ebuild
+++ b/sys-libs/libomp/libomp-13.0.0.ebuild
@@ -13,7 +13,7 @@ HOMEPAGE="https://openmp.llvm.org";
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos"
-IUSE="cuda hwloc kernel_linux offload ompt test"
+IUSE="cuda debug hwloc kernel_linux offload ompt test"
 # CUDA works only with the x86_64 ABI
 REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
 RESTRICT="!test? ( test )"
@@ -67,6 +67,9 @@ pkg_setup() {
 }
 
 multilib_src_configure() {
+       # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+       use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
        local libdir="$(get_libdir)"
        local mycmakeargs=(
                -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"

diff --git a/sys-libs/libomp/libomp-14.0.0.9999.ebuild 
b/sys-libs/libomp/libomp-14.0.0.9999.ebuild
index 5adaa0dfbca..bf8f376ce98 100644
--- a/sys-libs/libomp/libomp-14.0.0.9999.ebuild
+++ b/sys-libs/libomp/libomp-14.0.0.9999.ebuild
@@ -13,7 +13,7 @@ HOMEPAGE="https://openmp.llvm.org";
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
 KEYWORDS=""
-IUSE="cuda hwloc kernel_linux offload ompt test"
+IUSE="cuda debug hwloc kernel_linux offload ompt test"
 # CUDA works only with the x86_64 ABI
 REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )"
 RESTRICT="!test? ( test )"
@@ -66,6 +66,9 @@ pkg_setup() {
 }
 
 multilib_src_configure() {
+       # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+       use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
        local libdir="$(get_libdir)"
        local mycmakeargs=(
                -DOPENMP_LIBDIR_SUFFIX="${libdir#lib}"

Reply via email to