From 1d224e61d8227a342eea02918df4e0c810f27a0c Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Wed, 17 Aug 2016 23:48:10 +0200 Subject: [PATCH] [dts60+el7] [x86*] Bundle libipt (RH BZ 1256513). --- .gitignore | 1 + gdb.spec | 45 ++++++++++++++++++++++++++++++++++++++-- sources | 1 + v1.5-libipt-static.patch | 11 ++++++++++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 v1.5-libipt-static.patch diff --git a/.gitignore b/.gitignore index dbb15cb..d17dbf5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /gdb-libstdc++-v3-python-r225521.tar.xz +/v1.5.tar.gz /gdb-7.11.1.tar.xz diff --git a/gdb.spec b/gdb.spec index 3f68e51..7325dfb 100644 --- a/gdb.spec +++ b/gdb.spec @@ -27,7 +27,7 @@ Version: 7.11.1 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 77%{?dist} +Release: 78%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -128,6 +128,11 @@ Source5: %{libstdcxxpython}.tar.xz # Provide gdbtui for RHEL-5 and RHEL-6 as it is removed upstream (BZ 797664). Source6: gdbtui +# libipt: Intel Processor Trace Decoder Library +%global libipt_version 1.5 +Source7: v%{libipt_version}.tar.gz +Patch1142: v1.5-libipt-static.patch + # Work around out-of-date dejagnu that does not have KFAIL #=drop: That dejagnu is too old to be supported. Patch1: gdb-6.3-rh-dummykfail-20041202.patch @@ -619,12 +624,18 @@ BuildRequires: libbabeltrace-devel%{buildisa} BuildRequires: guile-devel%{buildisa} %endif %global have_libipt 0 -%if 0%{!?rhel:1} || 0%{?rhel} > 7 +%if 0%{!?rhel:1} || 0%{?rhel} > 7 || (0%{?rhel} == 7 && 0%{?scl:1}) %ifarch %{ix86} x86_64 %global have_libipt 1 +%if 0%{?scl:1} +BuildRequires: cmake +# RHEL-7.3 kernel Bug 1270539 +BuildRequires: kernel-headers >= 3.10.0-352.el7 +%else BuildRequires: libipt-devel%{buildisa} %endif %endif +%endif %if 0%{?_with_testsuite:1} @@ -755,6 +766,14 @@ This package provides INFO, HTML and PDF user manual for GDB. tar xJf %{SOURCE5} %endif # 0%{?rhel:1} && 0%{?rhel} <= 7 +%if 0%{have_libipt} && 0%{?scl:1} +tar xzf %{SOURCE7} +( + cd processor-trace-%{libipt_version} +%patch1142 -p1 +) +%endif + # Files have `# ' statements breaking VPATH / find-debuginfo.sh . (cd gdb;rm -fv $(perl -pe 's/\\\n/ /' - 7.11.1-78.fc24 +- [dts60+el7] [x86*] Bundle libipt (RH BZ 1256513). + * Wed Aug 3 2016 Jan Kratochvil - 7.11.1-77.fc24 - [aarch64] Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint (Andrew Pinski, RH BZ 1363635). diff --git a/sources b/sources index 26478eb..c03498c 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ 7ad32d3894aaf90d00a4343a735c3e1c gdb-libstdc++-v3-python-r225521.tar.xz +29efc08219d9d6a0536d58f9807c8722 v1.5.tar.gz 5aa71522e488e358243917967db87476 gdb-7.11.1.tar.xz diff --git a/v1.5-libipt-static.patch b/v1.5-libipt-static.patch new file mode 100644 index 0000000..93bc0f8 --- /dev/null +++ b/v1.5-libipt-static.patch @@ -0,0 +1,11 @@ +--- processor-trace-1.5/libipt/CMakeLists.txt-orig 2016-04-07 08:52:14.000000000 +0200 ++++ processor-trace-1.5/libipt/CMakeLists.txt 2016-08-17 23:12:23.241109244 +0200 +@@ -81,7 +81,7 @@ endif (CMAKE_HOST_WIN32) + + set(LIBIPT_FILES ${LIBIPT_FILES} ${LIBIPT_SECTION_FILES}) + +-add_library(libipt SHARED ++add_library(libipt STATIC + ${LIBIPT_FILES} + ) +