The package rpms/dyninst.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/dyninst.git/commit/?id=d51e94a73e....
Change:
+%ifarch %{ix86}
Thanks.
Full change:
============
commit deb50bba405a02e97206b4ed0a0cafae7df82e86
Author: Stan Cox <scox(a)redhat.com>
Date: Fri Dec 4 16:21:10 2020 -0500
Resolves: #1889545
diff --git a/dyninst.spec b/dyninst.spec
index cf7facd..b86cc6b 100644
--- a/dyninst.spec
+++ b/dyninst.spec
@@ -1,7 +1,7 @@
Summary: An API for Run-time Code Generation
License: LGPLv2+
Name: dyninst
-Release: 2%{?dist}
+Release: 1%{?dist}
URL:
http://www.dyninst.org
Version: 10.2.1
ExclusiveArch: %{ix86} x86_64 ppc64le aarch64
@@ -186,10 +186,7 @@ find %{buildroot}%{_libdir}/dyninst/testsuite/ \
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
%changelog
-* Tue Nov 10 2020 Stan Cox <scox(a)redhat.com> - 10.2.1-2
-- Enable debuginfod
-
-* Wed Oct 28 2020 Stan Cox <scox(a)redhat.com> - 10.2.1-1
+* Mon Dec 07 2020 Stan Cox <scox(a)redhat.com> - 10.2.1-1
- Update to 10.2.1
* Tue Oct 27 2020 Jeff Law <law(a)redhat.com> - 10.2.0-2
commit 922809d7399daa657607dc5ca0c1bd24f3472a47
Author: Stan Cox <scox(a)redhat.com>
Date: Tue Nov 10 16:14:43 2020 -0500
Resolves: #1889545
diff --git a/dyninst-10.2.1-dbid.patch b/dyninst-10.2.1-dbid.patch
index 91b5407..78f3997 100644
--- a/dyninst-10.2.1-dbid.patch
+++ b/dyninst-10.2.1-dbid.patch
@@ -92,18 +92,9 @@
https://sourceware.org/elfutils/Debuginfod.html
elseif(NOT (LibElf_FOUND AND LibDwarf_FOUND) AND STERILE_BUILD)
message(FATAL_ERROR "Elfutils not found and cannot be downloaded because build is
sterile.")
else()
-@@ -104,7 +121,7 @@ else()
- if(NOT (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR NOT
(${CMAKE_C_COMPILER_ID} STREQUAL "GNU"))
- message(FATAL_ERROR "ElfUtils will only build with the GNU compiler")
- endif()
--
-+
- include(ExternalProject)
- externalproject_add(
- ElfUtils
---- /dedyninst-10.2.1/dyninst-10.2.1/null
-+++ b/cmake/Modules/FindLibDebuginfod.cmake
+--- /dev/null
++++ dyninst-10.2.1/dyninst-10.2.1/cmake/Modules/FindLibDebuginfod.cmake
@@ -0,0 +1,76 @@
+#========================================================================================
+# FindDebuginfod
diff --git a/dyninst-10.2.1-pie.patch b/dyninst-10.2.1-pie.patch
deleted file mode 100644
index 095f037..0000000
--- a/dyninst-10.2.1-pie.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- dyninst-10.2.1/dyninst-10.2.1/dyninstAPI_RT/CMakeLists.txt 2020-02-24
09:41:30.207108160 -0500
-+++ dyninst-10.2.1/dyninst-10.2.1/dyninstAPI_RT/CMakeLists.txt 2020-08-25
15:57:28.437496257 -0400
-@@ -5,4 +5,4 @@
- set (DYNINST_ROOT ${PROJECT_SOURCE_DIR}/..)
--set(CMAKE_C_FLAGS "${DYNINST_RT_CMAKE_C_FLAGS}")
--set(CMAKE_CXX_FLAGS "${DYNINST_RT_CMAKE_CXX_FLAGS}")
-+# set(CMAKE_C_FLAGS "${DYNINST_RT_CMAKE_C_FLAGS}")
-+# set(CMAKE_CXX_FLAGS "${DYNINST_RT_CMAKE_CXX_FLAGS}")
diff --git a/dyninst.spec b/dyninst.spec
index 7f428c3..cf7facd 100644
--- a/dyninst.spec
+++ b/dyninst.spec
@@ -1,7 +1,7 @@
Summary: An API for Run-time Code Generation
License: LGPLv2+
Name: dyninst
-Release: 1%{?dist}
+Release: 2%{?dist}
URL:
http://www.dyninst.org
Version: 10.2.1
ExclusiveArch: %{ix86} x86_64 ppc64le aarch64
@@ -22,6 +22,7 @@ Patch5: testsuite-10.1.0-throw.patch
BuildRequires: gcc-c++
BuildRequires: elfutils-devel
BuildRequires: elfutils-libelf-devel
+BuildRequires: elfutils-debuginfod-client-devel
BuildRequires: boost-devel
BuildRequires: binutils-devel
BuildRequires: cmake
@@ -102,6 +103,7 @@ CXXFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS LDFLAGS
%cmake \
+ -DENABLE_DEBUGINFOD=1 \
-DINSTALL_LIB_DIR:PATH=%{_libdir}/dyninst \
-DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \
-DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \
@@ -139,6 +141,13 @@ cd ../%{testsuite_base}
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_libdir}/dyninst" >
%{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
+# Ugly hack to mask testsuite files from debuginfo extraction. Running the
+# testsuite requires debuginfo, so extraction is useless. However, debuginfo
+# extraction is still nice for the main libraries, so we don't want to disable
+# it package-wide. The permissions are restored by attr(755,-,-) in files.
+find %{buildroot}%{_libdir}/dyninst/testsuite/ \
+ -type f '!' -name '*.a' -execdir chmod 644 '{}' '+'
+
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@@ -177,6 +186,9 @@ echo "%{_libdir}/dyninst" >
%{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
%changelog
+* Tue Nov 10 2020 Stan Cox <scox(a)redhat.com> - 10.2.1-2
+- Enable debuginfod
+
* Wed Oct 28 2020 Stan Cox <scox(a)redhat.com> - 10.2.1-1
- Update to 10.2.1
commit 07af1b4b2a5f4f174aa08e1ea655e145e32ae121
Author: Stan Cox <scox(a)redhat.com>
Date: Thu Oct 29 17:34:54 2020 -0400
Update to 10.2.1
diff --git a/.gitignore b/.gitignore
index b84defc..3fd4028 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@
/testsuite-10.1.0.tar.gz
/dyninst-10.1.0.tar.gz
/dyninst-10.2.0.tar.gz
+/dyninst-10.2.1.tar.gz
diff --git a/dyninst-10.1.0-aarch-regs.patch b/dyninst-10.1.0-aarch-regs.patch
deleted file mode 100644
index 814137c..0000000
--- a/dyninst-10.1.0-aarch-regs.patch
+++ /dev/null
@@ -1,309 +0,0 @@
---- dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/BPatch_addressSpace.C.orig 2019-05-16
14:40:05.000000000 -0400
-+++ dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/BPatch_addressSpace.C 2019-11-06
10:20:08.567523510 -0500
---- BPatch_addressSpace.C.orig 2019-05-16 14:40:05.000000000 -0400
-+++ BPatch_addressSpace.C 2019-11-15 18:10:31.186122654 -0500
-@@ -1050,5 +1050,2 @@
- return true;
--
-- regs = registers_;
-- return true;
- }
---- dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/emit-aarch64.C.orig 2019-05-16
14:40:05.000000000 -0400
-+++ dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/emit-aarch64.C 2019-11-06
10:20:08.567523510 -0500
-@@ -276,9 +276,2 @@
-
-- if (register_num == REG_SP) {
-- insnCodeGen::generateAddSubImmediate(gen, insnCodeGen::Add, 0,
-- TRAMP_FRAME_SIZE_64, destination, REG_SP, true);
--
-- return;
-- }
--
- if (src->spilledState == registerSlot::unspilled)
-@@ -293,3 +286,3 @@
- // its on the stack so load it.
-- insnCodeGen::restoreRegister(gen, destination, offset + (register_num *
gen.width()),
-+ insnCodeGen::restoreRegister(gen, destination, offset + (src->encoding() *
gen.width()),
- insnCodeGen::Offset);
-@@ -298 +291,7 @@
-
-+bool EmitterAARCH64::emitMoveRegToReg(Register src, Register dest, codeGen &gen)
-+{
-+ insnCodeGen::generateMove(gen, dest, src);
-+ return true;
-+}
-+
---- dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/emit-aarch64.h.orig 2019-05-16
14:40:05.000000000 -0400
-+++ dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/emit-aarch64.h 2019-11-06
10:20:08.567523510 -0500
-@@ -107,6 +107,3 @@
-
-- virtual bool emitMoveRegToReg(Register, Register, codeGen &) {
-- assert(0);
-- return 0;
-- }
-+ virtual bool emitMoveRegToReg(Register, Register, codeGen &);
-
---- dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/inst-aarch64.C.orig 2019-05-16
14:40:05.000000000 -0400
-+++ dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/inst-aarch64.C 2019-11-06
10:20:08.567523510 -0500
-@@ -108,2 +108,4 @@
- registers.push_back(new registerSlot(r30, "r30", true,
registerSlot::liveAlways, registerSlot::GPR));
-+ // SP is r31, but also could be considered special. But now it's being added as
GPR
-+ registers.push_back(new registerSlot(sp, "r31", true,
registerSlot::liveAlways, registerSlot::GPR));
-
-@@ -111,3 +113,3 @@
- registers.push_back(new registerSlot(lr, "lr", true,
registerSlot::liveAlways, registerSlot::SPR));
-- registers.push_back(new registerSlot(sp, "sp", true,
registerSlot::liveAlways, registerSlot::SPR));
-+ //registers.push_back(new registerSlot(sp, "sp", true,
registerSlot::liveAlways, registerSlot::SPR));
- registers.push_back(new registerSlot(pstate, "nzcv", true,
registerSlot::liveAlways, registerSlot::SPR));
-@@ -183,9 +185,16 @@
- registerSlot *reg = theRegSpace->GPRs()[idx];
-- // We always save FP and LR for stack walking out of instrumentation
-- if (reg->liveState == registerSlot::live || reg->number == REG_FP ||
reg->number == REG_LR) {
-+ // We always save FP and LR for stack walking out of instrumentation
-+ //if (reg->liveState == registerSlot::live || reg->number == REG_FP ||
reg->number == REG_LR) {
- int offset_from_sp = offset + (reg->encoding() * gen.width());
-- insnCodeGen::saveRegister(gen, reg->number, offset_from_sp);
-+ if(reg->number != registerSpace::sp)
-+ insnCodeGen::saveRegister(gen, reg->number, offset_from_sp);
-+ else{
-+ // mov SP to x0
-+ insnCodeGen::generateAddSubImmediate(gen, insnCodeGen::Add, 0,
-+ TRAMP_FRAME_SIZE_64, REG_SP, 0, true);
-+ insnCodeGen::saveRegister(gen, 0, offset_from_sp);
-+ }
- theRegSpace->markSavedRegister(reg->number, offset_from_sp);
- ret++;
-- }
-+ //}
- }
-@@ -283,2 +292,4 @@
- if(reg->liveState == registerSlot::spilled) {
-+ if(reg->number == registerSpace::sp)
-+ continue;
- //#sasha this should be GPRSIZE_64 and not gen.width
-@@ -602,4 +613,2 @@
- {
-- //#sasha This function implementation is experimental.
--
- if (op != callOp) {
-@@ -623,4 +632,2 @@
- vector<int> savedRegs;
--
-- // save r0-r7
- for(size_t id = 0; id < gen.rs()->numGPRs(); id++)
-@@ -653,2 +660,6 @@
- assert(reg!=REG_NULL);
-+
-+ // mark reg offLimits so getScratchRegister won't use it
-+ registerSlot *regS = gen.rs()->GPRs()[id];
-+ regS->offLimits = true;
- }
-@@ -691,3 +702,2 @@
-
-- // r7-r0
- for (signed int ui = savedRegs.size()-1; ui >= 0; ui--) {
-@@ -697,2 +707,9 @@
-
-+ // Making operand's reg not offLimits again
-+ for(size_t id = 0; id < operands.size(); id++)
-+ {
-+ registerSlot *reg = gen.rs()->GPRs()[id];
-+ reg->offLimits = false;
-+ }
-+
- return 0;
-@@ -1426,4 +1443,53 @@
- bool EmitterAARCH64Stat::emitPLTCall(func_instance *callee, codeGen &gen) {
-- assert(0); //Not implemented
-- return emitPLTCommon(callee, true, gen);
-+ /*
-+ Address dest = getInterModuleFuncAddr(callee, gen);
-+ //Register scr = gen.rs()->getScratchRegister(gen);
-+ //Register lr = gen.rs()->getScratchRegister(gen);
-+ //Address pc = emitMovePCToReg(scr, gen);
-+
-+ Address varOffset = dest - gen.currAddr();
-+ //printf("VarOffset = %d\n", varOffset);
-+ //emitLoadRelative(lr, varOffset, scr, gen.width(), gen);
-+
-+ insnCodeGen::generateBranch(gen, gen.currAddr(), dest, true);
-+
-+ return true;
-+ */
-+
-+
-+ Address dest = getInterModuleFuncAddr(callee, gen);
-+ Register scr = gen.rs()->getScratchRegister(gen);
-+ Register lr = gen.rs()->getScratchRegister(gen);
-+ //Register scr = gen.rs()->getRegByName("r2");
-+ //Register lr = gen.rs()->getRegByName("r3");
-+ emitMovePCToReg(scr, gen);
-+
-+ Address varOffset = dest - gen.currAddr() + 4;
-+ //printf("VarOffset = %d\n", varOffset);
-+ emitLoadRelative(lr, varOffset, scr, gen.width(), gen);
-+ insnCodeGen::generateMemAccess(gen, insnCodeGen::Load, lr, lr, 0, 8,
insnCodeGen::Offset);
-+
-+ // indirect branch
-+ instruction branchInsn;
-+ branchInsn.clear();
-+
-+ //Set bits which are 0 for both BR and BLR
-+ INSN_SET(branchInsn, 0, 4, 0);
-+ INSN_SET(branchInsn, 10, 15, 0);
-+
-+ //Set register
-+ INSN_SET(branchInsn, 5, 9, lr);
-+
-+ //Set other bits. Basically, these are the opcode bits.
-+ //The only difference between BR and BLR is that bit 21 is 1 for BLR.
-+ INSN_SET(branchInsn, 16, 31, BRegOp);
-+ INSN_SET(branchInsn, 21, 21, 1);
-+ insnCodeGen::generate(gen, branchInsn);
-+ //insnCodeGen::generateBranch(gen, gen.currAddr(), lr, true);
-+ //insnCodeGen::generateBranch(gen, gen.currAddr(), gen.currAddr() +varOffset,
true);
-+
-+ return true;
-+
-+ //assert(0); //Not implemented
-+ //return emitPLTCommon(callee, true, gen);
- }
-@@ -1431,4 +1497,81 @@
- bool EmitterAARCH64Stat::emitPLTJump(func_instance *callee, codeGen &gen) {
-- assert(0); //Not implemented
-- return emitPLTCommon(callee, false, gen);
-+ /*
-+ Address dest = getInterModuleFuncAddr(callee, gen);
-+ //Register scr = gen.rs()->getScratchRegister(gen);
-+ //Register lr = gen.rs()->getScratchRegister(gen);
-+ Register scr = gen.rs()->getRegByName("r2");
-+ Register lr = gen.rs()->getRegByName("r3");
-+ //Address pc = emitMovePCToReg(scr, gen);
-+
-+ Address varOffset = dest - gen.currAddr();
-+ //printf("VarOffset = %d\n", varOffset);
-+ emitLoadRelative(lr, varOffset, scr, gen.width(), gen);
-+ insnCodeGen::generateMemAccess(gen, insnCodeGen::Load, lr, lr, 0, 8,
insnCodeGen::Offset);
-+
-+ insnCodeGen::generateBranch(gen, gen.currAddr(), lr, false);
-+
-+ return true;
-+ */
-+
-+ /*
-+ Address dest = getInterModuleFuncAddr(callee, gen);
-+ Register scr = gen.rs()->getScratchRegister(gen);
-+ Register lr = gen.rs()->getScratchRegister(gen);
-+ Address pc = emitMovePCToReg(scr, gen);
-+
-+ Address varOffset = dest - pc;
-+ printf("VarOffset = %d\n", varOffset);
-+ emitLoadRelative(lr, varOffset, scr, gen.width(), gen);
-+
-+ insnCodeGen::generateBranch(gen, gen.currAddr(), lr, false);
-+ return true;
-+ */
-+
-+ /*
-+ Address dest = getInterModuleFuncAddr(callee, gen);
-+ Register scr = gen.rs()->getScratchRegister(gen);
-+ Register lr = gen.rs()->getScratchRegister(gen);
-+ Address varOffset = dest - gen.currAddr();
-+ emitLoadRelative(lr, varOffset, scr, gen.width(), gen);
-+ insnCodeGen::generateBranch(gen, gen.currAddr(), gen.currAddr() +varOffset, false);
-+
-+ return true;
-+ */
-+
-+
-+ Address dest = getInterModuleFuncAddr(callee, gen);
-+ Register scr = gen.rs()->getScratchRegister(gen);
-+ Register lr = gen.rs()->getScratchRegister(gen);
-+ //Register scr = gen.rs()->getRegByName("r2");
-+ //Register lr = gen.rs()->getRegByName("r3");
-+ emitMovePCToReg(scr, gen);
-+
-+ Address varOffset = dest - gen.currAddr() + 4;
-+ //printf("VarOffset = %d\n", varOffset);
-+ emitLoadRelative(lr, varOffset, scr, gen.width(), gen);
-+ insnCodeGen::generateMemAccess(gen, insnCodeGen::Load, lr, lr, 0, 8,
insnCodeGen::Offset);
-+
-+ // indirect branch
-+ instruction branchInsn;
-+ branchInsn.clear();
-+
-+ //Set bits which are 0 for both BR and BLR
-+ INSN_SET(branchInsn, 0, 4, 0);
-+ INSN_SET(branchInsn, 10, 15, 0);
-+
-+ //Set register
-+ INSN_SET(branchInsn, 5, 9, lr);
-+
-+ //Set other bits. Basically, these are the opcode bits.
-+ //The only difference between BR and BLR is that bit 21 is 1 for BLR.
-+ INSN_SET(branchInsn, 16, 31, BRegOp);
-+ INSN_SET(branchInsn, 21, 21, 0);
-+ insnCodeGen::generate(gen, branchInsn);
-+ //insnCodeGen::generateBranch(gen, gen.currAddr(), lr, true);
-+ //insnCodeGen::generateBranch(gen, gen.currAddr(), gen.currAddr() +varOffset,
true);
-+
-+ return true;
-+
-+ //assert(0); //Not implemented
-+ //return emitPLTCommon(callee, false, gen);
- }
---- dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/inst-aarch64.h.orig 2019-05-16
14:40:05.000000000 -0400
-+++ dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/inst-aarch64.h 2019-11-06
10:20:08.567523510 -0500
-@@ -74,3 +74,3 @@
- //TODO Fix for ARM
--#define GPRSAVE_64 (31*GPRSIZE_64)
-+#define GPRSAVE_64 (32*GPRSIZE_64)
- #define FPRSAVE_64 (32*FPRSIZE_64)
---- dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/registerSpace.C.orig 2019-05-16
14:40:05.000000000 -0400
-+++ dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/registerSpace.C 2019-11-06
10:20:08.567523510 -0500
-@@ -110,2 +110,4 @@
- #elif defined(arch_aarch64)
-+ if(number == registerSpace::sp)
-+ return REG_SP;
- switch (type) {
-@@ -342,3 +344,3 @@
-
-- reg->markUsed(true);
-+ //reg->markUsed(true);
- gen.markRegDefined(reg->number);
-
---- dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/dynProcess.C.orig
-+++ dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/dynProcess.C
-@@ -3243,25 +3243,13 @@ bool PCProcess::continueSyncRPCThreads() {
- }
-
- void PCProcess::addTrap(Address from, Address to, codeGen &gen) {
-- map<Address, Breakpoint::ptr>::iterator breakIter =
-- installedCtrlBrkpts.find(from);
--
-- if( breakIter != installedCtrlBrkpts.end() ) {
-- if( !pcProc_->rmBreakpoint(from, breakIter->second) ) {
-- // Oops?
-- }
-- installedCtrlBrkpts.erase(breakIter);
-- }
--
-- Breakpoint::ptr newBreak = Breakpoint::newTransferBreakpoint(to);
-- newBreak->setSuppressCallbacks(true);
--
-- if( !pcProc_->addBreakpoint(from, newBreak) ) {
-- // Oops?
-- }
--
-- installedCtrlBrkpts.insert(make_pair(from, newBreak));
-- gen.invalidate();
-+ gen.invalidate();
-+ gen.allocate(4);
-+ gen.setAddrSpace(this);
-+ gen.setAddr(from);
-+ insnCodeGen::generateTrap(gen);
-+ trapMapping.addTrapMapping(from, to, true);
-+ springboard_cerr << "Generated springboard trap " << hex
<< from << "->" << to << dec << endl;
- }
-
- void PCProcess::removeTrap(Address from) {
diff --git a/dyninst-10.1.0-result.patch b/dyninst-10.1.0-result.patch
deleted file mode 100644
index 2738cf2..0000000
--- a/dyninst-10.1.0-result.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- dyninst-10.1.0/dyninst-10.1.0/instructionAPI/h/Result.h.sv 2018-11-09
11:48:08.000000000 -0500
-+++ dyninst-10.1.0/dyninst-10.1.0/instructionAPI/h/Result.h 2018-12-04 22:12:47.369579566
-0500
-@@ -449,10 +449,10 @@
- snprintf(hex, 20, "%x", val.s32val);
- break;
- case u64:
-- snprintf(hex, 20, "%lx", val.u64val);
-+ snprintf(hex, 20, "%" PRIx64, val.u64val);
- break;
- case s64:
-- snprintf(hex, 20, "%lx", val.s64val);
-+ snprintf(hex, 20, "%" PRIx64, val.s64val);
- break;
- case sp_float:
- snprintf(hex, 20, "%f", val.floatval);
-@@ -464,10 +464,10 @@
- snprintf(hex, 20, "%x", val.bitval);
- break;
- case u48:
-- snprintf(hex, 20, "%lx", val.s48val);
-+ snprintf(hex, 20, "%" PRIx64, val.s48val);
- break;
- case s48:
-- snprintf(hex, 20, "%lx", val.s48val);
-+ snprintf(hex, 20, "%" PRIx64, val.s48val);
- break;
- case m512:
- snprintf(hex, 20, "%p", val.m512val);
diff --git a/dyninst-10.2.1-dbid.patch b/dyninst-10.2.1-dbid.patch
new file mode 100644
index 0000000..91b5407
--- /dev/null
+++ b/dyninst-10.2.1-dbid.patch
@@ -0,0 +1,326 @@
+Debuginfod is a lightweight web service that indexes ELF/DWARF debugging
+resources by build-id and serves them over HTTP.
+
+This patch enables dyninst to query debuginfod servers for a file's
+separate debuginfo when it otherwise cannot be found.
+
+This patch also adds a cmake option -DENABLE_DEBUGINFOD to control
+whether dyninst is built with debuginfod support.
+
+This requires having the debuginfod client library (libdebuginfod)
+and header installed.
+
+Debuginfod is distributed with elfutils, for more information see
+https://sourceware.org/elfutils/Debuginfod.html
+---
+ cmake/ElfUtils.cmake | 37 ++++++++---
+ cmake/Modules/FindLibDebuginfod.cmake | 76 +++++++++++++++++++++
+ cmake/options.cmake | 2 +
+ elf/CMakeLists.txt | 3 +
+ elf/src/Elf_X.C | 95 ++++++++++++++++++++-------
+ 5 files changed, 178 insertions(+), 35 deletions(-)
+ create mode 100644 cmake/Modules/FindLibDebuginfod.cmake
+
+--- dyninst-10.2.1/dyninst-10.2.1/cmake/ElfUtils.cmake
++++ dyninst-10.2.1/dyninst-10.2.1/cmake/ElfUtils.cmake
+@@ -28,7 +28,7 @@
+ #
+ #======================================================================================
+
+-if(LibElf_FOUND AND LibDwarf_FOUND)
++if(LibElf_FOUND AND LibDwarf_FOUND AND (LibDebuginfod_FOUND OR NOT ENABLE_DEBUGINFOD))
+ return()
+ endif()
+
+@@ -37,7 +37,12 @@ if(NOT UNIX)
+ endif()
+
+ # Minimum acceptable version of elfutils
+-set(_min_version 0.178)
++if(ENABLE_DEBUGINFOD)
++ set(_min_version 0.179)
++else()
++ set(_min_version 0.178)
++endif()
++
+ set(ElfUtils_MIN_VERSION ${_min_version}
+ CACHE STRING "Minimum acceptable elfutils version")
+ if(${ElfUtils_MIN_VERSION} VERSION_LESS ${_min_version})
+@@ -62,7 +67,7 @@ set(ElfUtils_LIBRARYDIR "${ElfUtils_ROOT_DIR}/lib"
+ CACHE PATH "Hint directory that contains the elfutils library files")
+
+ # libelf/dwarf-specific directory hints
+-foreach(l LibElf LibDwarf)
++foreach(l LibElf LibDwarf LibDebuginfod)
+ foreach(d ROOT_DIR INCLUDEDIR LIBRARYDIR)
+ set(${l}_${d} ${ElfUtils_${d}})
+ endforeach()
+@@ -72,18 +77,30 @@ endforeach()
+
+ find_package(LibElf ${ElfUtils_MIN_VERSION})
+
+-# Don't search for libdw if we didn't find a suitable libelf
++# Don't search for libdw or libdebuginfod if we didn't find a suitable libelf
+ if(LibElf_FOUND)
+ find_package(LibDwarf ${ElfUtils_MIN_VERSION})
++ if (ENABLE_DEBUGINFOD)
++ find_package(LibDebuginfod ${ElfUtils_MIN_VERSION})
++ endif()
+ endif()
+
+ # -------------- SOURCE BUILD -------------------------------------------------
+-if(LibElf_FOUND AND LibDwarf_FOUND)
+- set(_eu_root ${ElfUtils_ROOT_DIR})
+- set(_eu_inc_dirs ${LibElf_INCLUDE_DIRS} ${LibDwarf_INCLUDE_DIRS})
+- set(_eu_lib_dirs ${LibElf_LIBRARY_DIRS} ${LibDwarf_LIBRARY_DIRS})
+- set(_eu_libs ${LibElf_LIBRARIES} ${LibDwarf_LIBRARIES})
++if(LibElf_FOUND AND LibDwarf_FOUND AND (NOT ENABLE_DEBUGINFOD OR LibDebuginfod_FOUND))
++ if(ENABLE_DEBUGINFOD AND LibDebuginfod_FOUND)
++ set(_eu_root ${ElfUtils_ROOT_DIR})
++ set(_eu_inc_dirs ${LibElf_INCLUDE_DIRS} ${LibDwarf_INCLUDE_DIRS}
${LibDebuginfod_INCLUDE_DIRS})
++ set(_eu_lib_dirs ${LibElf_LIBRARY_DIRS} ${LibDwarf_LIBRARY_DIRS}
${LibDebuginfod_LIBRARY_DIRS})
++ set(_eu_libs ${LibElf_LIBRARIES} ${LibDwarf_LIBRARIES} ${LibDebuginfod_LIBRARIES})
++ else()
++ set(_eu_root ${ElfUtils_ROOT_DIR})
++ set(_eu_inc_dirs ${LibElf_INCLUDE_DIRS} ${LibDwarf_INCLUDE_DIRS})
++ set(_eu_lib_dirs ${LibElf_LIBRARY_DIRS} ${LibDwarf_LIBRARY_DIRS})
++ set(_eu_libs ${LibElf_LIBRARIES} ${LibDwarf_LIBRARIES})
++ endif()
+ add_library(ElfUtils SHARED IMPORTED)
++elseif(ENABLE_DEBUGINFOD AND NOT LibDebuginfod_FOUND)
++ message(FATAL_ERROR "Debuginfod enabled but not found")
+ elseif(NOT (LibElf_FOUND AND LibDwarf_FOUND) AND STERILE_BUILD)
+ message(FATAL_ERROR "Elfutils not found and cannot be downloaded because build is
sterile.")
+ else()
+@@ -104,7 +121,7 @@ else()
+ if(NOT (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR NOT
(${CMAKE_C_COMPILER_ID} STREQUAL "GNU"))
+ message(FATAL_ERROR "ElfUtils will only build with the GNU compiler")
+ endif()
+-
++
+ include(ExternalProject)
+ externalproject_add(
+ ElfUtils
+
+--- /dedyninst-10.2.1/dyninst-10.2.1/null
++++ b/cmake/Modules/FindLibDebuginfod.cmake
+@@ -0,0 +1,76 @@
++#========================================================================================
++# FindDebuginfod
++# -----------
++#
++# Find debuginfod library and headers
++#
++# The module defines the following variables:
++#
++# This module reads hints about search locations from variables::
++#
++# LibDebuginfod_ROOT_DIR - Base directory the of libdebuginfod
installation
++# LibDebuginfod_INCLUDEDIR - Hint directory that contains the libdebuginfod
headers files
++# LibDebuginfod_LIBRARYDIR - Hint directory that contains the libdebuginfod
library files
++#
++# and saves search results persistently in CMake cache entries::
++#
++# LibDebuginfod_FOUND - True if headers and requested libraries were
found
++# LibDebuginfod_INCLUDE_DIRS - libdebuginfod include directories
++# LibDebuginfod_LIBRARY_DIRS - Link directories for libdebuginfod libraries
++# LibDebuginfod_LIBRARIES - libdebuginfod library files
++#
++# Utilize package config (e.g. /usr/lib64/pkgconfig/libdebuginfod.pc) to fetch
++# version information.
++#
++#========================================================================================
++
++find_package(PkgConfig QUIET)
++pkg_check_modules(PC_Debuginfod QUIET REQUIRED
libdebuginfod>=${ElfUtils_MIN_VERSION})
++set(LibDebuginfod_VERSION "${PC_Debuginfod_VERSION}")
++
++find_path(LibDebuginfod_INCLUDE_DIRS
++ NAMES
++ debuginfod.h
++ HINTS
++ ${PC_Debuginfod_INCLUDEDIR}
++ ${PC_Debuginfod_INCLUDE_DIRS}
++ ${LibDebuginfod_ROOT_DIR}/include
++ ${LibDebuginfod_ROOT_DIR}
++ ${LibDebuginfod_INCLUDEDIR}
++ PATHS
++ ${DYNINST_SYSTEM_INCLUDE_PATHS}
++ PATH_SUFFIXES
++ ${_path_suffixes}
++ DOC
++ "libdebuginfod include directories")
++
++find_library(LibDebuginfod_LIBRARIES
++ NAMES
++ libdebuginfod.so.1 libdebuginfod.so
++ HINTS
++ ${PC_Debuginfod_LIBDIR}
++ ${PC_Debuginfod_LIBRARY_DIRS}
++ ${LibDebuginfod_ROOT_DIR}/lib
++ ${LibDebuginfod_ROOT_DIR}
++ ${LibDebuginfod_LIBRARYDIR}
++ PATHS
++ ${DYNINST_SYSTEM_LIBRARY_PATHS}
++ PATH_SUFFIXES
++ ${_path_suffixes})
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(LibDebuginfod
++ FOUND_VAR
++ LibDebuginfod_FOUND
++ REQUIRED_VARS
++ LibDebuginfod_INCLUDE_DIRS
++ LibDebuginfod_LIBRARIES
++ VERSION_VAR
++ LibDebuginfod_VERSION)
++
++if(LibDebuginfod_FOUND)
++ set(LibDebuginfod_INCLUDE_DIRS ${LibDebuginfod_INCLUDE_DIRS})
++ set(LibDebuginfod_LIBRARIES ${LibDebuginfod_LIBRARIES})
++ get_filename_component(_debuginfod_dir ${LibDebuginfod_LIBRARIES} DIRECTORY)
++ set(LibDebuginfod_LIBRARY_DIRS ${_debuginfod_dir}
"${_debuginfod_dir}/elfutils")
++endif()
+
+--- dyninst-10.2.1/dyninst-10.2.1/cmake/options.cmake
++++ dyninst-10.2.1/dyninst-10.2.1/cmake/options.cmake
+@@ -16,6 +16,8 @@ option(USE_COTIRE "Enable Cotire precompiled headers")
+
+ option (ENABLE_LTO "Enable Link-Time Optimization" OFF)
+
++option(ENABLE_DEBUGINFOD "Enable debuginfod support" OFF)
++
+ # Some global on/off switches
+ if (LIGHTWEIGHT_SYMTAB)
+ add_definitions (-DWITHOUT_SYMTAB_API -DWITH_SYMLITE)
+
+--- dyninst-10.2.1/dyninst-10.2.1/elf/CMakeLists.txt
++++ dyninst-10.2.1/dyninst-10.2.1/elf/CMakeLists.txt
+@@ -27,5 +27,8 @@ endif()
+ add_dependencies(dynElf ElfUtils)
+ target_link_private_libraries(dynElf ${ElfUtils_LIBRARIES})
+
++if (ENABLE_DEBUGINFOD AND LibDebuginfod_FOUND)
++ add_definitions(-DDEBUGINFOD_LIB)
++endif()
+
+ add_definitions(-DDYNELF_LIB)
+
+
+--- dyninst-10.2.1/dyninst-10.2.1/elf/src/Elf_X.C
++++ dyninst-10.2.1/dyninst-10.2.1/elf/src/Elf_X.C
+@@ -47,6 +47,9 @@
+ #include <sstream>
+ #include <libelf.h>
+
++#if DEBUGINFOD_LIB
++#include <elfutils/debuginfod.h>
++#endif
+
+ using namespace std;
+ using boost::crc_32_type;
+@@ -1722,37 +1725,79 @@ bool Elf_X::findDebugFile(std::string origfilename, string
&output_name, char* &
+ }
+ }
+
+- if (debugFileFromDebugLink.empty())
+- return false;
++ if (!debugFileFromDebugLink.empty()) {
++ char *mfPathNameCopy = strdup(origfilename.c_str());
++ string objectFileDirName = dirname(mfPathNameCopy);
+
+- char *mfPathNameCopy = strdup(origfilename.c_str());
+- string objectFileDirName = dirname(mfPathNameCopy);
++ vector<string> fnames = list_of
++ (objectFileDirName + "/" + debugFileFromDebugLink)
++ (objectFileDirName + "/.debug/" + debugFileFromDebugLink)
++ ("/usr/lib/debug/" + objectFileDirName + "/" +
debugFileFromDebugLink);
+
+- vector<string> fnames = list_of
+- (objectFileDirName + "/" + debugFileFromDebugLink)
+- (objectFileDirName + "/.debug/" + debugFileFromDebugLink)
+- ("/usr/lib/debug/" + objectFileDirName + "/" +
debugFileFromDebugLink);
++ free(mfPathNameCopy);
+
+- free(mfPathNameCopy);
++ for(unsigned i = 0; i < fnames.size(); i++) {
++ bool result = loadDebugFileFromDisk(fnames[i], output_buffer,
output_buffer_size);
++ if (!result)
++ continue;
+
+- for(unsigned i = 0; i < fnames.size(); i++) {
+- bool result = loadDebugFileFromDisk(fnames[i], output_buffer, output_buffer_size);
+- if (!result)
+- continue;
+-
+- boost::crc_32_type crcComputer;
+- crcComputer.process_bytes(output_buffer, output_buffer_size);
+- if(crcComputer.checksum() != debugFileCrc) {
+- munmap(output_buffer, output_buffer_size);
+- continue;
+- }
++ boost::crc_32_type crcComputer;
++ crcComputer.process_bytes(output_buffer, output_buffer_size);
++ if(crcComputer.checksum() != debugFileCrc) {
++ munmap(output_buffer, output_buffer_size);
++ continue;
++ }
++
++ output_name = fnames[i];
++ cached_debug_buffer = output_buffer;
++ cached_debug_size = output_buffer_size;
++ cached_debug_name = output_name;
++ return true;
++ }
++ }
+
+- output_name = fnames[i];
+- cached_debug_buffer = output_buffer;
+- cached_debug_size = output_buffer_size;
+- cached_debug_name = output_name;
+- return true;
++#ifdef DEBUGINFOD_LIB
++ if (!debugFileFromBuildID.empty()) {
++ // Given /usr/lib/debug/.buildid/XX/YYYYYY.debug, isolate XXYYYYYY.
++ size_t idx1 = debugFileFromBuildID.find_last_of("/");
++ size_t idx2 = debugFileFromBuildID.find_last_of(".");
++
++ if (idx1 == string::npos || idx2 == string::npos
++ || idx1 < 2 || idx1 > idx2)
++ return false;
++
++ idx1 -= 2;
++ string buildid(debugFileFromBuildID.substr(idx1, idx2 - idx1));
++ buildid.erase(2, 1);
++
++ debuginfod_client *client = debuginfod_begin();
++ if (client == NULL)
++ return false;
++
++ char *filename;
++ int fd = debuginfod_find_debuginfo(client,
++ (const unsigned char *)buildid.c_str(),
++ 0, &filename);
++ debuginfod_end(client);
++
++ if (fd >= 0) {
++ string fname = string(filename);
++ free(filename);
++ close(fd);
++
++ bool result = loadDebugFileFromDisk(fname,
++ output_buffer,
++ output_buffer_size);
++ if (result) {
++ output_name = fname;
++ cached_debug_buffer = output_buffer;
++ cached_debug_size = output_buffer_size;
++ cached_debug_name = output_name;
++ return true;
++ }
++ }
+ }
++#endif
+
+ return false;
+ }
diff --git a/dyninst-10.2.0-pie.patch b/dyninst-10.2.1-pie.patch
similarity index 72%
rename from dyninst-10.2.0-pie.patch
rename to dyninst-10.2.1-pie.patch
index 32262c1..095f037 100644
--- a/dyninst-10.2.0-pie.patch
+++ b/dyninst-10.2.1-pie.patch
@@ -1,5 +1,5 @@
---- dyninst-10.2.0/dyninst-10.2.0/dyninstAPI_RT/CMakeLists.txt 2020-02-24
09:41:30.207108160 -0500
-+++ dyninst-10.2.0/dyninst-10.2.0/dyninstAPI_RT/CMakeLists.txt 2020-08-25
15:57:28.437496257 -0400
+--- dyninst-10.2.1/dyninst-10.2.1/dyninstAPI_RT/CMakeLists.txt 2020-02-24
09:41:30.207108160 -0500
++++ dyninst-10.2.1/dyninst-10.2.1/dyninstAPI_RT/CMakeLists.txt 2020-08-25
15:57:28.437496257 -0400
@@ -5,4 +5,4 @@
set (DYNINST_ROOT ${PROJECT_SOURCE_DIR}/..)
-set(CMAKE_C_FLAGS "${DYNINST_RT_CMAKE_C_FLAGS}")
diff --git a/dyninst.spec b/dyninst.spec
index bccc268..7f428c3 100644
--- a/dyninst.spec
+++ b/dyninst.spec
@@ -1,19 +1,20 @@
Summary: An API for Run-time Code Generation
License: LGPLv2+
Name: dyninst
-Release: 2%{?dist}
+Release: 1%{?dist}
URL:
http://www.dyninst.org
-Version: 10.2.0
+Version: 10.2.1
ExclusiveArch: %{ix86} x86_64 ppc64le aarch64
%define __testsuite_version 10.1.0
Source0:
https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}...
Source1:
https://github.com/dyninst/testsuite/archive/v10.1.0/testsuite-%{__testsu...
-Patch1: dyninst-10.2.0-pie.patch
-Patch2: testsuite-10.1.0-gettid.patch
-Patch3: testsuite-10.1.0-386.patch
-Patch4: %{name}-gcc11.patch
+Patch1: %{name}-gcc11.patch
+Patch2: %{name}-10.2.1-dbid.patch
+Patch3: testsuite-10.1.0-gettid.patch
+Patch4: testsuite-10.1.0-386.patch
+Patch5: testsuite-10.1.0-throw.patch
%global dyninst_base dyninst-%{version}
%global testsuite_base testsuite-%{__testsuite_version}
@@ -76,10 +77,11 @@ making sure that dyninst works properly.
%setup -q -n %{name}-%{version} -c
%setup -q -T -D -a 1
-%patch1 -p1 -b.pie
-%patch2 -p1 -b.gettid
-%patch3 -p1 -b.386
-%patch4 -p1 -b .gcc11
+%patch1 -p1 -b .gcc11
+%patch2 -p1 -b .dbid
+%patch3 -p1 -b .gettid
+%patch4 -p1 -b .386
+%patch5 -p1 -b .throw
# cotire seems to cause non-deterministic gcc errors
#
https://bugzilla.redhat.com/show_bug.cgi?id=1420551
@@ -175,6 +177,9 @@ echo "%{_libdir}/dyninst" >
%{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
%changelog
+* Wed Oct 28 2020 Stan Cox <scox(a)redhat.com> - 10.2.1-1
+- Update to 10.2.1
+
* Tue Oct 27 2020 Jeff Law <law(a)redhat.com> - 10.2.0-2
- Fix C++17 issue caught by gcc-11
diff --git a/sources b/sources
index 496c76e..3758b48 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
+SHA512 (dyninst-10.2.1.tar.gz) =
5666ffd888afdb9493bd495aa6027ca5b9f71fe811a6d88777d55b612c92f73dc6c008c1738be111175a31fb0a2ec804d8ffc3e79888d8366ae5b5b624537055
SHA512 (testsuite-10.1.0.tar.gz) =
47b91ebc0623f672378086a5f8d84e3934bd6b22d8932b12aaad257ccf7eb109505edb63dfbc3eb15aa099fc488a517835412099a77e3e0dd1275b3e3f672b3b
-SHA512 (dyninst-10.2.0.tar.gz) =
32ddf871a8b486bb38530a264b140f504bfd5fb9401c940c6e36540f932ad8dd87375a517324416035ba6eeb05107cf03acebc88bdaad4b5d4c3643afaa5ac5c
diff --git a/testsuite-10.1.0-386.patch b/testsuite-10.1.0-386.patch
index eb46c9f..7fbee48 100644
--- a/testsuite-10.1.0-386.patch
+++ b/testsuite-10.1.0-386.patch
@@ -1,5 +1,5 @@
---- dyninst-10.1.0/testsuite-10.1.0/CMakeLists.txt
-+++ dyninst-10.1.0/testsuite-10.1.0/CMakeLists.txt
+--- dyninst-10.2.0/testsuite-10.1.0/CMakeLists.txt
++++ dyninst-10.2.0/testsuite-10.1.0/CMakeLists.txt
@@ -111,7 +111,8 @@
if(UNIX)
enable_language(ASM-ATT)
@@ -13,8 +13,8 @@
elseif(WIN32)
enable_language(ASM_MASM)
---- dyninst-10.1.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
-+++ dyninst-10.1.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
+--- dyninst-10.2.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
++++ dyninst-10.2.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
@@ -96,21 +96,21 @@ test_results_t test_instruction_farcall_Mutator::executeTest()
if(decodedInsns.size() != expectedInsns) // six valid, one invalid
{
diff --git a/testsuite-10.1.0-throw.patch b/testsuite-10.1.0-throw.patch
new file mode 100644
index 0000000..886e9b5
--- /dev/null
+++ b/testsuite-10.1.0-throw.patch
@@ -0,0 +1,14 @@
+--- dyninst-10.2.0/testsuite-10.1.0/src/test_lib.h
++++ dyninst-10.2.0/testsuite-10.1.0/src/test_lib.h
+@@ -158,3 +158,3 @@
+
+- TESTLIB_DLL_EXPORT virtual ~LocErr() THROW;
++ TESTLIB_DLL_EXPORT virtual ~LocErr() throw();
+
+--- dyninst-10.2.0/testsuite-10.1.0/src/test_lib.C
++++ dyninst-10.2.0/testsuite-10.1.0/src/test_lib.C
+@@ -112,3 +112,3 @@
+
+-LocErr::~LocErr() THROW
++LocErr::~LocErr() throw()
+ {}
commit a0e0736c471536b406e9bdea552d73f41614c707
Author: Jeff Law <law(a)redhat.com>
Date: Tue Oct 27 15:47:20 2020 -0600
Commit the patch
diff --git a/dyninst-gcc11.patch b/dyninst-gcc11.patch
new file mode 100644
index 0000000..8fc536c
--- /dev/null
+++ b/dyninst-gcc11.patch
@@ -0,0 +1,13 @@
+diff --git a/testsuite-10.1.0/src/dyninst/test1_3.C
b/testsuite-10.1.0/src/dyninst/test1_3.C
+index d32f630..b9bd0ba 100644
+--- a/testsuite-10.1.0/src/dyninst/test1_3.C
++++ b/testsuite-10.1.0/src/dyninst/test1_3.C
+@@ -134,7 +134,7 @@ test_results_t test1_3_Mutator::executeTest()
+ }
+
+ // see if we can find the address
+- if (expr3_1->getBaseAddr() <= 0)
++ if (expr3_1->getBaseAddr() == 0)
+ {
+ logerror("*Error*: address %p for %s is not valid\n",
+ expr3_1->getBaseAddr(), globalVar);
commit 99f8c3271039ae1c3db38f679313512b86221420
Author: Jeff Law <law(a)redhat.com>
Date: Tue Oct 27 15:39:31 2020 -0600
Fix C++17 caught by gcc-11
diff --git a/dyninst.spec b/dyninst.spec
index 4b33ace..bccc268 100644
--- a/dyninst.spec
+++ b/dyninst.spec
@@ -1,7 +1,7 @@
Summary: An API for Run-time Code Generation
License: LGPLv2+
Name: dyninst
-Release: 1%{?dist}
+Release: 2%{?dist}
URL:
http://www.dyninst.org
Version: 10.2.0
ExclusiveArch: %{ix86} x86_64 ppc64le aarch64
@@ -13,6 +13,7 @@ Source1:
https://github.com/dyninst/testsuite/archive/v10.1.0/testsuite-%{__test
Patch1: dyninst-10.2.0-pie.patch
Patch2: testsuite-10.1.0-gettid.patch
Patch3: testsuite-10.1.0-386.patch
+Patch4: %{name}-gcc11.patch
%global dyninst_base dyninst-%{version}
%global testsuite_base testsuite-%{__testsuite_version}
@@ -78,6 +79,7 @@ making sure that dyninst works properly.
%patch1 -p1 -b.pie
%patch2 -p1 -b.gettid
%patch3 -p1 -b.386
+%patch4 -p1 -b .gcc11
# cotire seems to cause non-deterministic gcc errors
#
https://bugzilla.redhat.com/show_bug.cgi?id=1420551
@@ -173,6 +175,9 @@ echo "%{_libdir}/dyninst" >
%{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
%changelog
+* Tue Oct 27 2020 Jeff Law <law(a)redhat.com> - 10.2.0-2
+- Fix C++17 issue caught by gcc-11
+
* Tue Sep 01 2020 Stan Cox <scox(a)redhat.com> - 10.2.0-1
- Update to 10.2.0
commit 67da9764dd61988a2be9df5abb518d1aff387ad2
Author: Stan Cox <scox(a)redhat.com>
Date: Wed Sep 9 14:06:45 2020 -0400
Update to 10.2.0
diff --git a/dyninst.spec b/dyninst.spec
index 9235b75..4b33ace 100644
--- a/dyninst.spec
+++ b/dyninst.spec
@@ -91,7 +91,7 @@ cd %{dyninst_base}
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
LDFLAGS="$LDFLAGS $RPM_LD_FLAGS"
%ifarch %{ix86}
- CFLAGS="$CFLAGS -fno-lto"
+ CFLAGS="$CFLAGS -fno-lto -march=i686"
LDFLAGS="$LDFLAGS -fno-lto"
%endif
CXXFLAGS="$CFLAGS"
commit da6c061ac34c7cd2d4b13cc562ef1a734a09b703
Author: Stan Cox <scox(a)redhat.com>
Date: Wed Sep 2 16:33:16 2020 -0400
Update to 10.2.0
diff --git a/dyninst-10.2.0-pie.patch b/dyninst-10.2.0-pie.patch
new file mode 100644
index 0000000..32262c1
--- /dev/null
+++ b/dyninst-10.2.0-pie.patch
@@ -0,0 +1,8 @@
+--- dyninst-10.2.0/dyninst-10.2.0/dyninstAPI_RT/CMakeLists.txt 2020-02-24
09:41:30.207108160 -0500
++++ dyninst-10.2.0/dyninst-10.2.0/dyninstAPI_RT/CMakeLists.txt 2020-08-25
15:57:28.437496257 -0400
+@@ -5,4 +5,4 @@
+ set (DYNINST_ROOT ${PROJECT_SOURCE_DIR}/..)
+-set(CMAKE_C_FLAGS "${DYNINST_RT_CMAKE_C_FLAGS}")
+-set(CMAKE_CXX_FLAGS "${DYNINST_RT_CMAKE_CXX_FLAGS}")
++# set(CMAKE_C_FLAGS "${DYNINST_RT_CMAKE_C_FLAGS}")
++# set(CMAKE_CXX_FLAGS "${DYNINST_RT_CMAKE_CXX_FLAGS}")
commit d51e94a73e2fc0598070895204dd28945eec3a4b
Author: Stan Cox <scox(a)redhat.com>
Date: Wed Sep 2 13:54:44 2020 -0400
Update to 10.2.0
diff --git a/.gitignore b/.gitignore
index 925d489..b84defc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@
/testsuite-9.4.0.tar.gz
/testsuite-10.1.0.tar.gz
/dyninst-10.1.0.tar.gz
+/dyninst-10.2.0.tar.gz
diff --git a/Object-elf.patch b/Object-elf.patch
deleted file mode 100644
index c579ddb..0000000
--- a/Object-elf.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-# workaround for
https://github.com/dyninst/dyninst/issues/396
-
---- ./dyninst-9.3.2/symtabAPI/src/Object-elf.C.sv 2017-09-27 21:43:18.399429243 -0400
-+++ ./dyninst-9.3.2/symtabAPI/src/Object-elf.C 2017-09-27 21:56:14.485125928 -0400
-@@ -1445,6 +1445,24 @@
- if (fbt_iter == -1) { // Create new relocation entry.
- relocationEntry re( next_plt_entry_addr, offset, targ_name,
- NULL, type );
-+ if (type == R_X86_64_IRELATIVE) {
-+ vector<Symbol *> funcs;
-+ dyn_hash_map<std::string, std::vector<Symbol *>
>::iterator iter;
-+ // find the resolver function and use that as the
-+ // caller function symbol. The resolver has not run
-+ // so we don't know the ultimate destination.
-+ // Since the funcsByOffset map hasn't been setup yet
-+ // we cannot call associated_symtab->findFuncByEntryOffset
-+ for (iter = symbols_.begin(); iter != symbols_.end(); ++iter) {
-+ std::string name = iter->first;
-+ Symbol *sym = iter->second[0];
-+ if (sym->getOffset() == (Offset)addend) {
-+ // Use dynsym_list.push_back(sym) instead?
-+ re.addDynSym(sym);
-+ break;
-+ }
-+ }
-+ }
- re.setAddend(addend);
- re.setRegionType(rtype);
- if (dynsym_list.size() > 0)
diff --git a/addrtranslate-sysv.patch b/addrtranslate-sysv.patch
deleted file mode 100644
index 3de3a53..0000000
--- a/addrtranslate-sysv.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-# workaround for
https://github.com/dyninst/dyninst/issues/406
-
---- dyninst-9.3.2/common/src/addrtranslate-sysv.C.sv 2017-10-03 21:32:23.608614189 -0400
-+++ dyninst-9.3.2/common/src/addrtranslate-sysv.C 2017-10-03 21:33:36.538642148 -0400
-@@ -800,6 +800,7 @@
- continue;
- }
- if (obj_name == "linux-vdso.so.1" ||
-+ obj_name == "linux-vdso64.so.1" ||
- obj_name == "linux-gate.so.1")
- {
- continue;
diff --git a/dyninst-10.0.0-doc.patch b/dyninst-10.0.0-doc.patch
deleted file mode 100644
index 74ff705..0000000
--- a/dyninst-10.0.0-doc.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-
---- ./dyninst-10.0.0/CMakeLists.txt.sv 2018-11-09 11:48:08.000000000 -0500
-+++ ./dyninst-10.0.0/CMakeLists.txt 2018-11-13 11:35:20.109650373 -0500
-@@ -149,7 +149,7 @@ if(BUILD_DOCS)
- foreach(COMPONENT ${WORD_DOCS})
- add_dependencies(doc ${COMPONENT}-doc)
- set_target_properties(${COMPONENT}-doc PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
-- install(FILES ${CMAKE_SOURCE_DIR}/${COMPONENT}/doc/${COMPONENT}.pdf
-+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${COMPONENT}/doc/${COMPONENT}.pdf
- DESTINATION ${INSTALL_DOC_DIR}
- RENAME ${COMPONENT}-${VERSION_STRING}.pdf
- OPTIONAL
diff --git a/dyninst-10.0.0-examples.patch b/dyninst-10.0.0-examples.patch
deleted file mode 100644
index aee1d74..0000000
--- a/dyninst-10.0.0-examples.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-# workaround for
https://github.com/dyninst/dyninst/issues/396
-
---- ./dyninst-10.0.0/examples/CMakeLists.txt.sv 2018-11-09 11:48:08.000000000 -0500
-+++ ./dyninst-10.0.0/examples/CMakeLists.txt 2018-11-13 11:35:20.109650373 -0500
-@@ -1,19 +1,19 @@
-
-
--add_executable(unstrip unstrip/unstrip.C
-- unstrip/util.C
-- unstrip/types.C
-- unstrip/semanticDescriptor.C
-- unstrip/database.C
-- unstrip/fingerprint.C
-- unstrip/callback.C)
-+add_executable(unstrip unstrip.dir/unstrip.C
-+ unstrip.dir/util.C
-+ unstrip.dir/types.C
-+ unstrip.dir/semanticDescriptor.C
-+ unstrip.dir/database.C
-+ unstrip.dir/fingerprint.C
-+ unstrip.dir/callback.C)
- add_dependencies(unstrip parseAPI symtabAPI instructionAPI common)
- target_link_libraries(unstrip parseAPI symtabAPI instructionAPI common dynDwarf dynElf
${Boost_LIBRARIES})
-
--add_executable(codeCoverage codeCoverage/codeCoverage.C)
-+add_executable(codeCoverage codeCoverage.dir/codeCoverage.C)
- add_dependencies(codeCoverage dyninstAPI patchAPI parseAPI symtabAPI instructionAPI
pcontrol common stackwalk dynDwarf dynElf)
- target_link_libraries(codeCoverage dyninstAPI patchAPI parseAPI symtabAPI instructionAPI
pcontrol common stackwalk dynDwarf dynElf ${Boost_LIBRARIES})
-
--add_library(Inst SHARED codeCoverage/libInst.C)
-+add_library(Inst SHARED codeCoverage.dir/libInst.C)
-
- add_executable(cfg_to_dot ../parseAPI/doc/example.cc)
-@@ -29,5 +29,5 @@
- )
-
--install (
-- FILES unstrip/ddb.db unstrip/params.db unstrip/unistd.db DESTINATION
${INSTALL_BIN_DIR}
--)
-+# install (
-+# FILES unstrip.dir/ddb.db unstrip.dir/params.db unstrip.dir/unistd.db
DESTINATION ${INSTALL_BIN_DIR}
-+# )
diff --git a/dyninst-10.0.0-result.patch b/dyninst-10.0.0-result.patch
deleted file mode 100644
index 89d6e70..0000000
--- a/dyninst-10.0.0-result.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- ./dyninst-10.0.0/instructionAPI/h/Result.h.sv 2018-11-09 11:48:08.000000000 -0500
-+++ ./dyninst-10.0.0/instructionAPI/h/Result.h 2018-12-04 22:12:47.369579566 -0500
-@@ -449,10 +449,10 @@
- snprintf(hex, 20, "%x", val.s32val);
- break;
- case u64:
-- snprintf(hex, 20, "%lx", val.u64val);
-+ snprintf(hex, 20, "%" PRIx64, val.u64val);
- break;
- case s64:
-- snprintf(hex, 20, "%lx", val.s64val);
-+ snprintf(hex, 20, "%" PRIx64, val.s64val);
- break;
- case sp_float:
- snprintf(hex, 20, "%f", val.floatval);
-@@ -464,10 +464,10 @@
- snprintf(hex, 20, "%x", val.bitval);
- break;
- case u48:
-- snprintf(hex, 20, "%lx", val.s48val);
-+ snprintf(hex, 20, "%" PRIx64, val.s48val);
- break;
- case s48:
-- snprintf(hex, 20, "%lx", val.s48val);
-+ snprintf(hex, 20, "%" PRIx64, val.s48val);
- break;
- case m512:
- snprintf(hex, 20, "%p", val.m512val);
diff --git a/dyninst-10.0.0-tribool.patch b/dyninst-10.0.0-tribool.patch
deleted file mode 100644
index 0caec2f..0000000
--- a/dyninst-10.0.0-tribool.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-commit 54a2debd94c3e8df3b6f1e579f1db02dae61cbb7
-Author: Mark W. Krentel <krentel(a)rice.edu>
-Date: Fri Feb 1 13:14:11 2019 -0600
-
- Add some explicit casts from boost::tribool to bool for some code in (#541)
-
- Add some explicit casts from boost::tribool to bool for some code in
dataflowAPI/rose/util/Message.[Ch]. This was breaking the build when using boost >=
1.69.
-
-diff --git a/dataflowAPI/rose/util/Message.C b/dataflowAPI/rose/util/Message.C
-index a8a66ad4c..5e276f97d 100644
---- ./dyninst-10.0.0/dataflowAPI/rose/util/Message.C
-+++ ./dyninst-10.0.0/dataflowAPI/rose/util/Message.C
-@@ -1123,7 +1123,7 @@ StreamBuf::bake() {
- destination_->bakeDestinations(message_.properties(), baked_/*out*/);
- anyUnbuffered_ = false;
- for (BakedDestinations::const_iterator bi=baked_.begin(); bi!=baked_.end()
&& !anyUnbuffered_; ++bi)
-- anyUnbuffered_ = !bi->second.isBuffered;
-+ anyUnbuffered_ = static_cast<bool>(!bi->second.isBuffered);
- isBaked_ = true;
- }
- }
-diff --git a/dataflowAPI/rose/util/Message.h b/dataflowAPI/rose/util/Message.h
-index 816f68d2e..03592cb97 100644
---- ./dyninst-10.0.0/dataflowAPI/rose/util/Message.h
-+++ ./dyninst-10.0.0/dataflowAPI/rose/util/Message.h
-@@ -386,7 +386,8 @@ struct SAWYER_EXPORT ColorSpec {
- ColorSpec(AnsiColor fg, AnsiColor bg, bool bold): foreground(fg), background(bg),
bold(bold) {}
-
- /** Returns true if this object is in its default-constructed state. */
-- bool isDefault() const { return COLOR_DEFAULT==foreground &&
COLOR_DEFAULT==background && !bold; }
-+ bool isDefault() const { return COLOR_DEFAULT==foreground &&
COLOR_DEFAULT==background
-+ && static_cast<bool>(!bold); }
- };
-
- /** Colors to use for each message importance.
diff --git a/dyninst-9.3.1-Address.patch b/dyninst-9.3.1-Address.patch
deleted file mode 100644
index 213cc4a..0000000
--- a/dyninst-9.3.1-Address.patch
+++ /dev/null
@@ -1,108 +0,0 @@
---- dyninst-9.3.1/common/src/Types.h.sv 2017-03-07 22:05:52.187479600 -0500
-+++ dyninst-9.3.1/common/src/Types.h 2017-03-07 22:06:57.509944790 -0500
-@@ -170,7 +170,7 @@
- static const Address ADDR_NULL = (Address)(0);
- #else
- #define ADDR_NULL (0)
--typedef uintptr_t Address;
-+typedef unsigned long Address;
- #endif
- /* Note the inherent assumption that the size of a "long" integer matches
- that of an address (void*) on every supported Paradyn/Dyninst system!
-
-
---- dyninst-9.3.1/common/h/dyntypes.h.sv 2017-03-08 10:16:18.657768231 -0500
-+++ dyninst-9.3.1/common/h/dyntypes.h 2017-03-08 10:37:07.992634513 -0500
-@@ -124,8 +124,8 @@
-
- namespace Dyninst
- {
-- typedef uintptr_t Address;
-- typedef uintptr_t Offset;
-+ typedef unsigned long Address;
-+ typedef unsigned long Offset;
-
- #if defined(_MSC_VER)
- typedef int PID;
-
-
---- dyninst-9.3.1/dyninstAPI/src/BPatch_memoryAccess.C.sv 2017-03-07 23:07:29.371789000
-0500
-+++ dyninst-9.3.1/dyninstAPI/src/BPatch_memoryAccess.C 2017-03-07 23:07:48.928927991
-0500
-@@ -33,10 +33,10 @@
- #include <stdlib.h>
- #include <string.h>
-
-+#include "../../common/src/Types.h"
- #include "BPatch_memoryAccess_NP.h"
- #include "BPatch_Vector.h"
- #include "BPatch_point.h"
--#include "../../common/src/Types.h"
-
- BPatch_addrSpec_NP::BPatch_addrSpec_NP(long _imm, int _ra, int _rb, int _scale) :
- imm(_imm),
-
-
---- dyninst-9.3.1/dyninstAPI/h/BPatch_instruction.h.sv 2017-03-08 09:06:46.638171175
-0500
-+++ dyninst-9.3.1/dyninstAPI/h/BPatch_instruction.h 2017-03-08 09:00:39.455564403 -0500
-@@ -69,7 +69,7 @@
- public:
-
- BPatch_instruction(internal_instruction *insn,
-- uintptr_t _addr);
-+ Dyninst::Address _addr);
- virtual ~BPatch_instruction();
-
- void getInstruction(const unsigned char *&_buffer, unsigned char &_length);
-
-
---- dyninst-9.3.1/dyninstAPI/h/BPatch_memoryAccess_NP.h.sv 2017-03-07 22:43:56.645745821
-0500
-+++ dyninst-9.3.1/dyninstAPI/h/BPatch_memoryAccess_NP.h 2017-03-08 10:39:30.122643332
-0500
-@@ -121,27 +121,27 @@
- static BPatch_memoryAccess* init_tables();
-
- // initializes only the first access; #bytes is a constant
-- BPatch_memoryAccess(internal_instruction *, uintptr_t _addr,
-+ BPatch_memoryAccess(internal_instruction *, Dyninst::Address _addr,
- bool _isLoad, bool _isStore, unsigned int _bytes,
- long _imm, int _ra, int _rb, unsigned int _scale = 0,
- int _cond = -1, bool _nt = false);
-
- // initializes only the first access; #bytes is an expression w/scale
-- BPatch_memoryAccess(internal_instruction *insn, uintptr_t _addr,
-+ BPatch_memoryAccess(internal_instruction *insn, Dyninst::Address _addr,
- bool _isinternal_Load, bool _isStore,
- long _imm_s, int _ra_s, int _rb_s, unsigned int _scale_s,
- long _imm_c, int _ra_c, int _rb_c, unsigned int _scale_c,
- int _cond, bool _nt, int _preFcn = -1);
-
- // initializes only the first access; #bytes is an expression
-- BPatch_memoryAccess(internal_instruction *insn, uintptr_t _addr,
-+ BPatch_memoryAccess(internal_instruction *insn, Dyninst::Address _addr,
- bool _isLoad, bool _isStore, bool _isPrefetch,
- long _imm_s, int _ra_s, int _rb_s,
- long _imm_c, int _ra_c, int _rb_c,
- unsigned short _preFcn);
-
- // initializes only the first access; #bytes is an expression & not a prefetch
-- BPatch_memoryAccess(internal_instruction *insn, uintptr_t _addr,
-+ BPatch_memoryAccess(internal_instruction *insn, Dyninst::Address _addr,
- bool _isLoad, bool _isStore, long _imm_s, int _ra_s, int _rb_s,
- long _imm_c, int _ra_c, int _rb_c);
-
-@@ -156,14 +156,14 @@
- int _cond, bool _nt);
-
- // initializes both accesses; #bytes is a constant
-- BPatch_memoryAccess(internal_instruction *insn, uintptr_t _addr,
-+ BPatch_memoryAccess(internal_instruction *insn, Dyninst::Address _addr,
- bool _isLoad, bool _isStore, unsigned int _bytes,
- long _imm, int _ra, int _rb, unsigned int _scale,
- bool _isLoad2, bool _isStore2, unsigned int _bytes2,
- long _imm2, int _ra2, int _rb2, unsigned int _scale2);
-
- // initializes both accesses; #bytes is an expression & not a prefetch
-- BPatch_memoryAccess(internal_instruction *insn, uintptr_t _addr, bool _isLoad, bool
_isStore,
-+ BPatch_memoryAccess(internal_instruction *insn, Dyninst::Address _addr, bool _isLoad,
bool _isStore,
- long _imm_s, int _ra_s, int _rb_s, unsigned int _scale_s,
- long _imm_c, int _ra_c, int _rb_c, unsigned int _scale_c,
- bool _isLoad2, bool _isStore2, long _imm2_s, int _ra2_s,
diff --git a/dyninst-9.3.2-gcc8.patch b/dyninst-9.3.2-gcc8.patch
deleted file mode 100644
index faec1a1..0000000
--- a/dyninst-9.3.2-gcc8.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up dyninst-9.3.2/dyninst-9.3.2/symtabAPI/src/emitElf.C.me
dyninst-9.3.2/dyninst-9.3.2/symtabAPI/src/emitElf.C
---- dyninst-9.3.2/dyninst-9.3.2/symtabAPI/src/emitElf.C.me 2018-02-07 15:50:36.706363500
+0100
-+++ dyninst-9.3.2/dyninst-9.3.2/symtabAPI/src/emitElf.C 2018-02-07 16:30:28.173906877
+0100
-@@ -2512,8 +2512,8 @@ void emitElf<ElfTypes>::createDynamicSec
-
- if (!object->hasReldyn() && !object->hasReladyn()) {
- if (object->getRelType() == Region::RT_REL) {
-- new_dynamic_entries.push_back(make_pair(DT_REL, 0));
-- new_dynamic_entries.push_back(make_pair(DT_RELSZ, 0));
-+ new_dynamic_entries.push_back(std::pair<long, long>(DT_REL, 0));
-+ new_dynamic_entries.push_back(std::pair<long, long>(DT_RELSZ, 0));
-
- dynamicSecData[DT_REL].push_back(dynsecData + curpos);
- dynsecData[curpos].d_tag = DT_NULL;
diff --git a/dyninst-9.3.2-glibc-rpc.patch b/dyninst-9.3.2-glibc-rpc.patch
deleted file mode 100644
index 1f6098e..0000000
--- a/dyninst-9.3.2-glibc-rpc.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -up dyninst-9.3.2/dyninst-9.3.2/CMakeLists.txt.me
dyninst-9.3.2/dyninst-9.3.2/CMakeLists.txt
---- dyninst-9.3.2/dyninst-9.3.2/CMakeLists.txt.me 2018-02-07 15:25:38.925763122 +0100
-+++ dyninst-9.3.2/dyninst-9.3.2/CMakeLists.txt 2018-02-07 15:30:42.242099198 +0100
-@@ -19,6 +19,7 @@ include (${DYNINST_ROOT}/cmake/shared.cm
- configure_file(cmake/version.h.in common/h/version.h)
- include_directories(${PROJECT_BINARY_DIR})
- include_directories(${PROJECT_BINARY_DIR}/common/h)
-+include_directories("/usr/include/tirpc/")
- set (HEADER_DIRS common
- dataflowAPI
- dyninstAPI
-diff -up dyninst-9.3.2/dyninst-9.3.2/common/src/linuxHeaders.h.me
dyninst-9.3.2/dyninst-9.3.2/common/src/linuxHeaders.h
---- dyninst-9.3.2/dyninst-9.3.2/common/src/linuxHeaders.h.me 2018-02-07
15:06:45.961780668 +0100
-+++ dyninst-9.3.2/dyninst-9.3.2/common/src/linuxHeaders.h 2018-02-07 15:38:56.832278338
+0100
-@@ -281,7 +281,7 @@ inline bool_t P_xdr_string(XDR *x, char
- inline void P_xdrrec_create(XDR *x, const u_int send_sz, const u_int rec_sz,
- const caddr_t handle,
- xdr_rd_func read_r, xdr_wr_func write_f) {
-- xdrrec_create(x, send_sz, rec_sz, handle, (int(*)(char*, char*, int))read_r,
(int(*)(char*, char*, int))write_f);}
-+ xdrrec_create(x, send_sz, rec_sz, handle, (int(*)(void*, void*, int))read_r,
(int(*)(void*, void*, int))write_f);}
- inline bool_t P_xdrrec_endofrecord(XDR *x, int now) {
- return (xdrrec_endofrecord(x, now));}
- inline bool_t P_xdrrec_skiprecord(XDR *x) { return (xdrrec_skiprecord(x));}
diff --git a/dyninst.spec b/dyninst.spec
index 94a1a6c..9235b75 100644
--- a/dyninst.spec
+++ b/dyninst.spec
@@ -1,21 +1,21 @@
Summary: An API for Run-time Code Generation
License: LGPLv2+
Name: dyninst
-Release: 10%{?dist}
+Release: 1%{?dist}
URL:
http://www.dyninst.org
-Version: 10.1.0
+Version: 10.2.0
ExclusiveArch: %{ix86} x86_64 ppc64le aarch64
+%define __testsuite_version 10.1.0
Source0:
https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}...
-Source1:
https://github.com/dyninst/testsuite/archive/v%{version}/testsuite-%{vers...
+Source1:
https://github.com/dyninst/testsuite/archive/v10.1.0/testsuite-%{__testsu...
-Patch1: dyninst-10.1.0-result.patch
+Patch1: dyninst-10.2.0-pie.patch
Patch2: testsuite-10.1.0-gettid.patch
Patch3: testsuite-10.1.0-386.patch
-Patch4: dyninst-10.1.0-aarch-regs.patch
%global dyninst_base dyninst-%{version}
-%global testsuite_base testsuite-%{version}
+%global testsuite_base testsuite-%{__testsuite_version}
BuildRequires: gcc-c++
BuildRequires: elfutils-devel
@@ -28,7 +28,7 @@ BuildRequires: tbb tbb-devel
BuildRequires: tex-latex
# Extra requires just for the testsuite
-BuildRequires: gcc-gfortran nasm libxml2-devel
+BuildRequires: gcc-gfortran libxml2-devel
# Testsuite files should not provide/require anything
%{?filter_setup:
@@ -75,10 +75,9 @@ making sure that dyninst works properly.
%setup -q -n %{name}-%{version} -c
%setup -q -T -D -a 1
-%patch1 -p1 -b.result
+%patch1 -p1 -b.pie
%patch2 -p1 -b.gettid
%patch3 -p1 -b.386
-%patch4 -p1 -b.aarch
# cotire seems to cause non-deterministic gcc errors
#
https://bugzilla.redhat.com/show_bug.cgi?id=1420551
@@ -91,6 +90,10 @@ cd %{dyninst_base}
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
LDFLAGS="$LDFLAGS $RPM_LD_FLAGS"
+%ifarch %{ix86}
+ CFLAGS="$CFLAGS -fno-lto"
+ LDFLAGS="$LDFLAGS -fno-lto"
+%endif
CXXFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS LDFLAGS
@@ -165,17 +168,14 @@ echo "%{_libdir}/dyninst" >
%{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%files testsuite
%{_bindir}/parseThat
-%exclude %{_bindir}/cfg_to_dot
-%exclude /usr/bin/codeCoverage
-%exclude /usr/bin/unstrip
-%exclude /usr/bin/ddb.db
-%exclude /usr/bin/params.db
-%exclude /usr/bin/unistd.db
%dir %{_libdir}/dyninst/testsuite/
%attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a]
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
%changelog
+* Tue Sep 01 2020 Stan Cox <scox(a)redhat.com> - 10.2.0-1
+- Update to 10.2.0
+
* Mon Aug 10 2020 Orion Poplawski <orion(a)nwra.com> - 10.1.0-10
- Use new cmake macros (FTBFS bz#1863463)
- Add BR tex-latex for doc build
diff --git a/sources b/sources
index 1ccb90f..496c76e 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
SHA512 (testsuite-10.1.0.tar.gz) =
47b91ebc0623f672378086a5f8d84e3934bd6b22d8932b12aaad257ccf7eb109505edb63dfbc3eb15aa099fc488a517835412099a77e3e0dd1275b3e3f672b3b
-SHA512 (dyninst-10.1.0.tar.gz) =
41d7b6f0fce56be84091cc9796b7fa3295a652f80203b6e246df3a28a7bdc02a11996a38c9ccfb2ea7c18ee937a93020ff31d5d4652fd8082f99167e94b16df6
+SHA512 (dyninst-10.2.0.tar.gz) =
32ddf871a8b486bb38530a264b140f504bfd5fb9401c940c6e36540f932ad8dd87375a517324416035ba6eeb05107cf03acebc88bdaad4b5d4c3643afaa5ac5c
diff --git a/testsuite-10.1.0-386.patch b/testsuite-10.1.0-386.patch
index 38dcd3a..eb46c9f 100644
--- a/testsuite-10.1.0-386.patch
+++ b/testsuite-10.1.0-386.patch
@@ -1,3 +1,18 @@
+--- dyninst-10.1.0/testsuite-10.1.0/CMakeLists.txt
++++ dyninst-10.1.0/testsuite-10.1.0/CMakeLists.txt
+@@ -111,7 +111,8 @@
+ if(UNIX)
+ enable_language(ASM-ATT)
+- if("${DYNINST_PLATFORM}" MATCHES "i386")
+- enable_language(ASM_NASM)
+- endif()
++# nasm/yasm are deprecated
++# if("${DYNINST_PLATFORM}" MATCHES "i386")
++# enable_language(ASM_NASM)
++# endif()
+ elseif(WIN32)
+ enable_language(ASM_MASM)
+
--- dyninst-10.1.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
+++ dyninst-10.1.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
@@ -96,21 +96,21 @@ test_results_t test_instruction_farcall_Mutator::executeTest()
diff --git a/testsuite-9.3.0-junit-nullptr.patch b/testsuite-9.3.0-junit-nullptr.patch
deleted file mode 100644
index 6f055c3..0000000
--- a/testsuite-9.3.0-junit-nullptr.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- testsuite-9.3.0/src/JUnitOutputDriver.cpp.nullptr 2016-12-19 14:55:38.000000000
-0800
-+++ testsuite-9.3.0/src/JUnitOutputDriver.cpp 2017-02-15 11:19:22.628056889 -0800
-@@ -35,7 +35,7 @@ void JUnitOutputDriver::startNewTest(std
- {
- std::stringstream suitename;
- suitename << last_group->modname;
-- if(last_group->mutatee != '\0') suitename << "."
<< last_group->mutatee;
-+ if(last_group->mutatee != nullptr) suitename << "."
<< last_group->mutatee;
- log(HUMAN, "<testsuite name=\"%s\" errors=\"%d\"
skipped=\"%d\" tests=\"%d\" failures=\"%d\">\n",
- suitename.str().c_str(), group_errors, group_skips, group_tests,
group_failures);
- log(HUMAN, group_output.str().c_str());