diff --git a/dyninst-support-clang-build.patch b/dyninst-support-clang-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..41bde6f39cb313130b9bba04d4381fa7dded5acd --- /dev/null +++ b/dyninst-support-clang-build.patch @@ -0,0 +1,39 @@ +From f3c08aa19c0a5e0543bb12f812afc476276b18f7 Mon Sep 17 00:00:00 2001 +From: luofeng +Date: Wed, 8 Nov 2023 16:35:56 +0800 +Subject: [PATCH] support clang build + +--- + cmake/options.cmake | 2 +- + common/h/concurrent.h | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cmake/options.cmake b/cmake/options.cmake +index 1f46d90..4327db2 100644 +--- a/cmake/options.cmake ++++ b/cmake/options.cmake +@@ -1,5 +1,5 @@ + # Use OpenMP? +-option (USE_OpenMP "Use OpenMP for parallel parsing" ON) ++option (USE_OpenMP "Use OpenMP for parallel parsing" OFF) + + # Use SymtabAPI or SymLite? + option (LIGHTWEIGHT_SYMTAB "Use lightweight symtab interface for ParseAPI, ProcControl, and Stackwalker; disables DyninstAPI build" OFF) +diff --git a/common/h/concurrent.h b/common/h/concurrent.h +index d9fdd16..641c038 100644 +--- a/common/h/concurrent.h ++++ b/common/h/concurrent.h +@@ -147,8 +147,8 @@ public: + + using base::clear; + +- using base::iterator; +- using base::const_iterator; ++ using typename base::iterator; ++ using typename base::const_iterator; + using base::begin; + using base::end; + }; +-- +2.19.1 + diff --git a/dyninst.spec b/dyninst.spec index 120727a1ad1ad7a64c58f7ebed72094de6f160d0..836509daf3ef41bb5b8fdbe3d91f180355aaad46 100644 --- a/dyninst.spec +++ b/dyninst.spec @@ -1,6 +1,6 @@ Name: dyninst License: LGPLv2+ -Release: 4 +Release: 5 Version: 11.0.1 Summary: An API for Run-time Code Generation ExclusiveArch: x86_64 aarch64 @@ -21,6 +21,8 @@ BuildRequires: libtirpc-devel tbb tbb-devel BuildRequires: gcc-gfortran glibc-static libstdc++-static nasm +Patch1: dyninst-support-clang-build.patch + %description Dyninst is an Application Program Interface (API) to permit the insertion of code into a computer application that is @@ -48,6 +50,10 @@ dyninst-doc contains API documentation for the Dyninst libraries. %setup -q -n %{name}-%{version} -c %setup -q -T -D -a 1 +pushd %{dyninst_base} +%patch1 -p1 +popd + sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \ %{dyninst_base}/cmake/shared.cmake @@ -120,6 +126,12 @@ echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %doc %{dyninst_base}/symtabAPI/doc/symtabAPI.pdf %changelog +* Mon Nov 6 2023 luofeng - 11.0.1-5 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC:support clang build + * Fri Dec 16 2022 Weifeng Su - 11.0.1-4 - remove useless testsuite in devel package