[dts60+el7] [x86*] Bundle libipt (RH BZ 1256513).

This commit is contained in:
Jan Kratochvil 2016-08-17 23:48:10 +02:00
parent 3f32311b4a
commit 1d224e61d8
4 changed files with 56 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/gdb-libstdc++-v3-python-r225521.tar.xz
/v1.5.tar.gz
/gdb-7.11.1.tar.xz

View File

@ -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 `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
(cd gdb;rm -fv $(perl -pe 's/\\\n/ /' <Makefile.in|sed -n 's/^YYFILES = //p'))
@ -970,6 +989,25 @@ CFLAGS="$CFLAGS -DNEED_RL_STATE_FEDORA_GDB"
CFLAGS="$CFLAGS -DNEED_DETACH_SIGSTOP"
%endif
%if 0%{have_libipt} && 0%{?scl:1}
(
mkdir processor-trace-%{libipt_version}-root
mkdir processor-trace-%{libipt_version}-build
cd processor-trace-%{libipt_version}-build
# -DPTUNIT:BOOL=ON has no effect on ctest.
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPTUNIT:BOOL=OFF \
-DDEVBUILD:BOOL=ON \
../../processor-trace-%{libipt_version}
make VERBOSE=1 %{?_smp_mflags}
ctest -V %{?_smp_mflags}
make install DESTDIR=../processor-trace-%{libipt_version}-root
)
# There is also: --with-libipt-prefix
CFLAGS="$CFLAGS -I$PWD/processor-trace-%{libipt_version}-root%{_includedir}"
LDFLAGS="$LDFLAGS -L$PWD/processor-trace-%{libipt_version}-root%{_libdir}"
%endif
# --htmldir and --pdfdir are not used as they are used from %{gdb_build}.
../configure \
--prefix=%{_prefix} \
@ -1412,6 +1450,9 @@ then
fi
%changelog
* Wed Aug 17 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.1-78.fc24
- [dts60+el7] [x86*] Bundle libipt (RH BZ 1256513).
* Wed Aug 3 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.1-77.fc24
- [aarch64] Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint
(Andrew Pinski, RH BZ 1363635).

View File

@ -1,2 +1,3 @@
7ad32d3894aaf90d00a4343a735c3e1c gdb-libstdc++-v3-python-r225521.tar.xz
29efc08219d9d6a0536d58f9807c8722 v1.5.tar.gz
5aa71522e488e358243917967db87476 gdb-7.11.1.tar.xz

11
v1.5-libipt-static.patch Normal file
View File

@ -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}
)