public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - realize -fsanitizer=foo failures were due to missing buildrequires...
@ 2026-11-23  9:28 Panu Matilainen
  0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23  9:28 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : e1b7ad0d3656812042710ee10147a582f6dac8af
            Author : Panu Matilainen <pmatilai@redhat.com>
            Date   : 2014-04-11T11:28:08+03:00
            Stats  : +13/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/e1b7ad0d3656812042710ee10147a582f6dac8af?branch=pmatilai-v6

            Log:
            - realize -fsanitizer=foo failures were due to missing buildrequires...
- add bcond for building with sanitizer(s)

---
diff --git a/rpm.spec b/rpm.spec
index 5cb58b2..e99a9c9 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -6,6 +6,8 @@
 %bcond_without check
 # disable plugins initially
 %bcond_with plugins
+# build with sanitizers?
+%bcond_without sanitizer
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 
@@ -128,6 +130,14 @@ BuildRequires: binutils-devel
 # Couple of patches change makefiles so, require for now...
 BuildRequires: automake libtool
 
+%if %{with sanitizer}
+BuildRequires: libasan
+BuildRequires: libubsan
+#BuildRequires: liblsan
+#BuildRequires: libtsan
+%global sanitizer_flags -fsanitize=address -fsanitize=undefined
+%endif
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -296,7 +306,7 @@ ln -s db-%{bdbver} db
 #LDFLAGS=-L%{_libdir}/db%{bdbver}
 %endif
 CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
-CFLAGS="$RPM_OPT_FLAGS -fsanitize=address"
+CFLAGS="$RPM_OPT_FLAGS %{?sanitizer_flags}"
 export CPPFLAGS CFLAGS LDFLAGS
 
 autoreconf -i -f
@@ -528,7 +538,8 @@ exit 0
 
 %changelog
 * Fri Apr 11 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-6
-- build with -fsanitize=address for now
+- build with -fsanitize=address and -fsanitize=undefined for now
+- add spec build conditional for sanitizer build
 
 * Tue Apr 08 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-5
 - replace unmaintained dependency generator scripts with rpmdeps wrappers

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

only message in thread, other threads:[~2026-11-23  9:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:28 [rpms/rpm] pmatilai-v6: - realize -fsanitizer=foo failures were due to missing buildrequires Panu Matilainen

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