public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rocm-smi] f44: Define NDEBUG so release builds drop assert()
@ 2026-09-27 13:51 Igor Giamoniano
  0 siblings, 0 replies; only message in thread
From: Igor Giamoniano @ 2026-09-27 13:51 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rocm-smi
            Branch : f44
            Commit : 10a1961a8e40cdb675767ef9123833c2316ad53f
            Author : Igor Giamoniano <igorgphotoarte@gmail.com>
            Date   : 2026-09-27T06:51:16-07:00
            Stats  : +5/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/rocm-smi/c/10a1961a8e40cdb675767ef9123833c2316ad53f?branch=f44

            Log:
            Define NDEBUG so release builds drop assert()

Nothing in the spec or in %cmake sets CMAKE_BUILD_TYPE, so
CMAKE_CXX_FLAGS_RELEASE ("-DNDEBUG") never applies and the shipped
library keeps its assert() calls alive. On unexpected sysfs data that
aborts the calling process (btop, SIGABRT) instead of returning
RSMI_STATUS_UNEXPECTED_DATA, which is what the throw right after the
assert is there for.

Setting CMAKE_BUILD_TYPE=Release would also turn on upstream's
Release-only post-build strip, which empties debugsourcefiles.list and
fails the build, so NDEBUG goes in through CXXFLAGS instead.

Verified in mock on rawhide: -DNDEBUG on every compile line, debuginfo
and debugsource intact.

Resolves: rhbz#2417737
Assisted-by: Claude (Anthropic)

---
diff --git a/rocm-smi.spec b/rocm-smi.spec
index a30d527..fbd9116 100644
--- a/rocm-smi.spec
+++ b/rocm-smi.spec
@@ -49,7 +49,7 @@
 
 Name:       %{pkg_name}
 Version:    %{rocm_version}
-Release:    3%{?dist}
+Release:    4%{?dist}
 Summary:    ROCm System Management Interface Library
 
 License:    MIT AND NCSA
@@ -123,6 +123,7 @@ sed -i -e '/TARGETS gtest gtest_main/,+3d' tests/rocm_smi_test/CMakeLists.txt
 sed -i '/#include <string.*/a#include <iomanip>' tests/rocm_smi_test/test_base.h
 
 %build
+export CXXFLAGS="%{build_cxxflags} -DNDEBUG"
 %cmake \
     -DBUILD_TESTS=%{build_test} \
     -DCMAKE_INSTALL_LIBDIR=%{pkg_libdir} \
@@ -164,6 +165,9 @@ rm -f %{buildroot}%{pkg_prefix}/share/doc/rocm-smi-lib/LICENSE.md
 %endif
 
 %changelog
+* Thu Sep 24 2026 Igor Giamoniano <igorgphotoarte@gmail.com> - 7.1.1-4
+- Define NDEBUG so release builds drop assert() (rhbz#2417737)
+
 * Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-27 13:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-27 13:51 [rpms/rocm-smi] f44: Define NDEBUG so release builds drop assert() Igor Giamoniano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox