[packages/dyninst] - rel 2: fix gcc 15 build
arekm
arekm at pld-linux.org
Fri Sep 18 23:09:06 CEST 2026
commit 5a67ae898101d25fd092b4c1b6d6cffaa690cdaf
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Sep 18 23:08:24 2026 +0200
- rel 2: fix gcc 15 build
dyninst-gcc15.patch | 50 +++++++++++++++++++++++++++++++++++++++++++++++
dyninst-tbb-version.patch | 35 +++++++++++++++++++++++++++++++++
dyninst.spec | 6 +++++-
3 files changed, 90 insertions(+), 1 deletion(-)
---
diff --git a/dyninst.spec b/dyninst.spec
index 287215c..89bbdf0 100644
--- a/dyninst.spec
+++ b/dyninst.spec
@@ -2,7 +2,7 @@ Summary: API for Run-time Code Generation
Summary(pl.UTF-8): API do generowania kodu w czasie działania
Name: dyninst
Version: 13.0.0
-Release: 1
+Release: 2
License: LGPL v2.1+
Group: Libraries
#Source0Download: https://github.com/dyninst/dyninst/releases
@@ -12,6 +12,8 @@ Patch0: %{name}-libname.patch
Patch1: %{name}-x32.patch
Patch2: %{name}-x86.patch
Patch3: %{name}-install.patch
+Patch4: %{name}-tbb-version.patch
+Patch5: %{name}-gcc15.patch
URL: https://dyninst.org/dyninst
# libiberty
BuildRequires: binutils-devel
@@ -87,6 +89,8 @@ Statyczne biblioteki dyninst.
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
+%patch -P 4 -p1
+%patch -P 5 -p1
%build
export CXXFLAGS="%{rpmcxxflags} -DTBB_DEFINE_STD_HASH_SPECIALIZATIONS"
diff --git a/dyninst-gcc15.patch b/dyninst-gcc15.patch
new file mode 100644
index 0000000..b6847bd
--- /dev/null
+++ b/dyninst-gcc15.patch
@@ -0,0 +1,50 @@
+# gcc 15: libstdc++ no longer provides <cstdint> types transitively
+# upstream 6a025732 (sha1.C) + Fedora github-pr1880-ish.patch (headers)
+diff --git a/common/src/sha1.C b/common/src/sha1.C
+index 91e9ad2915..d6e76c5727 100644
+--- a/common/src/sha1.C
++++ b/common/src/sha1.C
+@@ -102,6 +102,7 @@ A million repetitions of "a"
+
+ #include <stdio.h>
+ #include <string.h>
++#include <cstdint>
+
+ #include "dyntypes.h"
+ #include "common/src/sha1.h"
+diff --git a/common/h/Annotatable.h b/common/h/Annotatable.h
+index 6588e3dd36da..262a193ffbb8 100644
+--- a/common/h/Annotatable.h
++++ b/common/h/Annotatable.h
+@@ -44,6 +44,7 @@
+ #include <assert.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <cstdint>
+ #include "util.h"
+ #include "compiler_annotations.h"
+
+diff --git a/instructionAPI/h/ArchSpecificFormatters.h b/instructionAPI/h/ArchSpecificFormatters.h
+index b32d4cc14e03..145c604f9619 100644
+--- a/instructionAPI/h/ArchSpecificFormatters.h
++++ b/instructionAPI/h/ArchSpecificFormatters.h
+@@ -34,6 +34,7 @@
+ #include <map>
+ #include <vector>
+ #include <string>
++#include <cstdint>
+ #include "Architecture.h"
+ #include "registers/MachRegister.h"
+
+diff --git a/common/src/arch-x86.h b/common/src/arch-x86.h
+index ecdc3dc13..7745306d3 100644
+--- a/common/src/arch-x86.h
++++ b/common/src/arch-x86.h
+@@ -40,6 +40,7 @@
+ #include <set>
+ #include <map>
+ #include <vector>
++#include <cstdint>
+ #include "entryIDs.h"
+ #include "registers/MachRegister.h"
+ #include "common/src/ia32_locations.h"
diff --git a/dyninst-tbb-version.patch b/dyninst-tbb-version.patch
new file mode 100644
index 0000000..126888e
--- /dev/null
+++ b/dyninst-tbb-version.patch
@@ -0,0 +1,35 @@
+# upstream e03567db: oneTBB >= 2022.3 no longer includes version.h implicitly
+diff --git a/cmake/tpls/DyninstTBB.cmake b/cmake/tpls/DyninstTBB.cmake
+index 6433967167..8bb69531c1 100644
+--- a/cmake/tpls/DyninstTBB.cmake
++++ b/cmake/tpls/DyninstTBB.cmake
+@@ -49,4 +49,13 @@ message(STATUS "Found TBB ${TBB_VERSION}")
+ get_target_property(_tmp TBB::tbb INTERFACE_INCLUDE_DIRECTORIES)
+ message(STATUS "TBB include directories: ${_tmp}")
+
++# Starting with 2021.2, the version macros were extracted into 'version.h'
++# To retain support for earlier versions, we conditionally include it
++foreach(_dir ${_tmp})
++ if(EXISTS "${_dir}/tbb/version.h")
++ target_compile_definitions(Dyninst::TBB INTERFACE "DYNINST_TBB_HAS_VERSION_H")
++ break()
++ endif()
++endforeach()
++
+ unset(_find_path_args)
+diff --git a/common/h/concurrent.h b/common/h/concurrent.h
+index fd7891d07e..a305ab0556 100644
+--- a/common/h/concurrent.h
++++ b/common/h/concurrent.h
+@@ -42,6 +42,11 @@
+ #include <tbb/concurrent_hash_map.h>
+ #include <tbb/concurrent_vector.h>
+ #include <tbb/concurrent_queue.h>
++
++#ifdef DYNINST_TBB_HAS_VERSION_H
++#include <tbb/version.h>
++#endif
++
+ #include <boost/functional/hash.hpp>
+
+ namespace Dyninst {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dyninst.git/commitdiff/5a67ae898101d25fd092b4c1b6d6cffaa690cdaf
More information about the pld-cvs-commit
mailing list