public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Igor Giamoniano <igorgphotoarte@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rocm-smi] rawhide: Define NDEBUG so release builds drop assert()
Date: Thu, 24 Sep 2026 19:07:29 GMT	[thread overview]
Message-ID: <179027684942.1.4266763035528748463.rpms-rocm-smi-065fe8fed812@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/rocm-smi
            Branch : rawhide
            Commit : 065fe8fed812f7e72b718b98eca5b91f5377360a
            Author : Igor Giamoniano <igorgphotoarte@gmail.com>
            Date   : 2026-09-24T12:08:30-03:00
            Stats  : +5/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/rocm-smi/c/065fe8fed812f7e72b718b98eca5b91f5377360a?branch=rawhide

            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 174b6de..3a47ff6 100644
--- a/rocm-smi.spec
+++ b/rocm-smi.spec
@@ -70,7 +70,7 @@ Version:    %{rocm_version}
 %if %{with preview}
 Release:    0%{?dist}
 %else
-Release:    1%{?dist}
+Release:    2%{?dist}
 %endif
 Summary:    ROCm System Management Interface Library
 
@@ -201,6 +201,7 @@ rm -rf tests
 %endif
 
 %build
+export CXXFLAGS="%{build_cxxflags} -DNDEBUG"
 %cmake \
     -DBUILD_TESTS=%{build_test} \
     -DCMAKE_INSTALL_LIBDIR=%{pkg_libdir} \
@@ -251,6 +252,9 @@ rm -f %{buildroot}%{pkg_prefix}/share/doc/rocm-smi-lib/LICENSE.md
 %endif
 
 %changelog
+* Thu Sep 24 2026 Igor Giamoniano <igorgphotoarte@gmail.com> - 10.0.0-2
+- Define NDEBUG so release builds drop assert() (rhbz#2417737)
+
 * Sun Sep 20 2026 Tom Rix <Tom.Rix@amd.com> - 10.0.0-1
 - Update to 10.0
 

                 reply	other threads:[~2026-09-24 19:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179027684942.1.4266763035528748463.rpms-rocm-smi-065fe8fed812@fedoraproject.org \
    --to=igorgphotoarte@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox