Fix libipt bundling in 7.12.

This commit is contained in:
Jan Kratochvil 2016-09-04 20:19:06 +02:00
parent 0300a2eb2d
commit dc6b8f4f24
2 changed files with 33 additions and 19 deletions

View File

@ -1,7 +1,7 @@
Index: gdb-7.11.1/gdb/nat/linux-btrace.h
Index: gdb-7.11.90.20160904/gdb/nat/linux-btrace.h
===================================================================
--- gdb-7.11.1.orig/gdb/nat/linux-btrace.h 2016-02-10 04:19:39.000000000 +0100
+++ gdb-7.11.1/gdb/nat/linux-btrace.h 2016-08-19 20:49:18.735477251 +0200
--- gdb-7.11.90.20160904.orig/gdb/nat/linux-btrace.h 2016-09-04 04:02:13.000000000 +0200
+++ gdb-7.11.90.20160904/gdb/nat/linux-btrace.h 2016-09-04 20:11:47.375275492 +0200
@@ -28,6 +28,177 @@
# include <linux/perf_event.h>
#endif
@ -180,11 +180,11 @@ Index: gdb-7.11.1/gdb/nat/linux-btrace.h
struct target_ops;
#if HAVE_LINUX_PERF_EVENT_H
Index: gdb-7.11.1/gdb/configure
Index: gdb-7.11.90.20160904/gdb/configure
===================================================================
--- gdb-7.11.1.orig/gdb/configure 2016-08-19 20:47:11.488325144 +0200
+++ gdb-7.11.1/gdb/configure 2016-08-19 20:47:11.658326684 +0200
@@ -10635,7 +10635,7 @@
--- gdb-7.11.90.20160904.orig/gdb/configure 2016-09-04 20:11:47.238274285 +0200
+++ gdb-7.11.90.20160904/gdb/configure 2016-09-04 20:11:47.378275519 +0200
@@ -10601,7 +10601,7 @@
#include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5
@ -193,11 +193,11 @@ Index: gdb-7.11.1/gdb/configure
#endif
_ACEOF
Index: gdb-7.11.1/gdb/configure.ac
Index: gdb-7.11.90.20160904/gdb/configure.ac
===================================================================
--- gdb-7.11.1.orig/gdb/configure.ac 2016-08-19 20:47:11.489325154 +0200
+++ gdb-7.11.1/gdb/configure.ac 2016-08-19 20:47:11.659326693 +0200
@@ -1452,7 +1452,7 @@
--- gdb-7.11.90.20160904.orig/gdb/configure.ac 2016-09-04 20:11:47.238274285 +0200
+++ gdb-7.11.90.20160904/gdb/configure.ac 2016-09-04 20:11:47.379275528 +0200
@@ -1461,7 +1461,7 @@
AC_PREPROC_IFELSE(AC_LANG_SOURCE([[
#include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5
@ -206,14 +206,24 @@ Index: gdb-7.11.1/gdb/configure.ac
#endif
]]), [perf_event=yes], [perf_event=no])
if test "$perf_event" != yes; then
--- gdb-7.11.1/gdb/gdb.c-orig 2016-02-10 04:19:39.000000000 +0100
+++ gdb-7.11.1/gdb/gdb.c 2016-08-23 09:15:13.169650953 +0200
@@ -25,6 +25,11 @@ main (int argc, char **argv)
Index: gdb-7.11.90.20160904/gdb/gdb.c
===================================================================
--- gdb-7.11.90.20160904.orig/gdb/gdb.c 2016-09-04 04:02:13.000000000 +0200
+++ gdb-7.11.90.20160904/gdb/gdb.c 2016-09-04 20:12:28.018633552 +0200
@@ -20,11 +20,19 @@
#include "main.h"
#include "interps.h"
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
+extern "C" void __libipt_init(void);
+#endif
+
int
main (int argc, char **argv)
{
struct captured_main_args args;
+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
+ extern void __libipt_init(void);
+ __libipt_init();
+#endif
+

View File

@ -22,12 +22,13 @@ Name: %{?scl_prefix}gdb
%global snapsrc 20160801
# See timestamp of source gnulib installed into gdb/gnulib/ .
%global snapgnulib 20150822
%global tarname gdb-7.11.90.20160904
%global tardate 20160904
%global tarname gdb-7.11.90.%{tardate}
Version: 7.12
# 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: 9%{?dist}
Release: 0.10.%{tardate}%{?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
@ -999,8 +1000,6 @@ CFLAGS="$CFLAGS -DNEED_RL_STATE_FEDORA_GDB"
CFLAGS="$CFLAGS -DNEED_DETACH_SIGSTOP"
%endif
export CXXFLAGS="$CFLAGS"
%if 0%{have_libipt} && 0%{?el7:1} && 0%{?scl:1}
(
mkdir processor-trace-%{libipt_version}-root
@ -1020,6 +1019,8 @@ CFLAGS="$CFLAGS -I$PWD/processor-trace-%{libipt_version}-root%{_includedir}"
LDFLAGS="$LDFLAGS -L$PWD/processor-trace-%{libipt_version}-root%{_libdir}"
%endif
export CXXFLAGS="$CFLAGS"
# --htmldir and --pdfdir are not used as they are used from %{gdb_build}.
../configure \
--prefix=%{_prefix} \
@ -1463,6 +1464,9 @@ then
fi
%changelog
* Sun Sep 4 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-0.10.20160904.fc25
- Fix libipt bundling in 7.12.
* Sun Sep 4 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-0.9.20160904.fc25
- Rebase to FSF GDB 7.11.90.20160904 (pre-7.12 branch snapshot).
- Make Version tag 7.12; but it is still a pre-release.