[gdb] Enable smaller %{_bindir}/gdb in future by no longer using -rdynamic. Make --enablerepo to use '*-de
Jan Kratochvil
jankratochvil at fedoraproject.org
Thu Jan 19 20:44:59 UTC 2012
commit cc92f09aa16a7ab52db514968d2b0c5001fbab5e
Author: Jan Kratochvil <jan.kratochvil at redhat.com>
Date: Thu Jan 19 21:44:54 2012 +0100
Enable smaller %{_bindir}/gdb in future by no longer using -rdynamic.
Make --enablerepo to use '*-debug*' for RHEL compatibility (BZ 781571).
On older RHELs make readline bundled again (BZ 701131).
Fix build compatibility with RHEL-5 due to false noarch build.
gdb-6.6-buildid-locate-rpm.patch | 6 ++--
gdb-python-rdynamic.patch | 44 ++++++++++++++++++++++++++++++++++++++
gdb.spec | 24 +++++++++++++++++---
3 files changed, 67 insertions(+), 7 deletions(-)
---
diff --git a/gdb-6.6-buildid-locate-rpm.patch b/gdb-6.6-buildid-locate-rpm.patch
index 4490df3..5602e7c 100644
--- a/gdb-6.6-buildid-locate-rpm.patch
+++ b/gdb-6.6-buildid-locate-rpm.patch
@@ -258,7 +258,7 @@ Index: gdb-7.4.50.20111218/gdb/elfread.c
+
+ /* Base package name for `debuginfo-install'. We do not use the
+ `yum' command directly as the line
-+ yum --disablerepo='*' --enablerepo='*-debuginfo' \
++ yum --disablerepo='*' --enablerepo='*-debug*' \
+ install NAME-debuginfo.ARCH
+ would be more complicated than just:
+ debuginfo-install NAME-VERSION-RELEASE.ARCH
@@ -399,7 +399,7 @@ Index: gdb-7.4.50.20111218/gdb/elfread.c
+
/* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages
- Try to install the hash file ...
-+ yum --disablerepo='*' --enablerepo='*-debuginfo' install ...
++ yum --disablerepo='*' --enablerepo='*-debug*' install ...
avoidance. */
struct missing_filepair
@@ -458,7 +458,7 @@ Index: gdb-7.4.50.20111218/gdb/elfread.c
+ _("Missing separate debuginfo for %s\n"), binary);
+ if (debug != NULL)
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
-+ "yum --disablerepo='*' --enablerepo='*-debuginfo'"
++ "yum --disablerepo='*' --enablerepo='*-debug*'"
+ " install", debug);
+ }
}
diff --git a/gdb-python-rdynamic.patch b/gdb-python-rdynamic.patch
new file mode 100644
index 0000000..a576b72
--- /dev/null
+++ b/gdb-python-rdynamic.patch
@@ -0,0 +1,44 @@
+--- a/gdb/configure
++++ b/gdb/configure
+@@ -14631,6 +14631,10 @@ rm -f core conftest.err conftest.$ac_objext \
+ # Problem does not happen for the recommended libpythonX.Y.so linkage.
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PYTHON_CFLAGS"
++ old_CPPFLAGS="$CPPFLAGS"
++ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
++ old_LIBS="$LIBS"
++ LIBS="$LIBS $PYTHON_LIBS"
+ if test "$cross_compiling" = yes; then :
+ true
+ else
+@@ -14657,6 +14661,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ fi
+
+ CFLAGS="$old_CFLAGS"
++ CPPFLAGS="$old_CPPFLAGS"
++ LIBS="$old_LIBS"
+ fi
+ LDFLAGS="$old_LDFLAGS"
+ fi
+--- a/gdb/configure.ac
++++ b/gdb/configure.ac
+@@ -1576,6 +1576,10 @@ if test "${gdb_native}" = yes; then
+ # Problem does not happen for the recommended libpythonX.Y.so linkage.
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PYTHON_CFLAGS"
++ old_CPPFLAGS="$CPPFLAGS"
++ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
++ old_LIBS="$LIBS"
++ LIBS="$LIBS $PYTHON_LIBS"
+ AC_RUN_IFELSE(
+ AC_LANG_PROGRAM(
+ [#include "]${have_libpython}[/Python.h"],
+@@ -1586,6 +1590,8 @@ if test "${gdb_native}" = yes; then
+ return err == 0 ? 0 : 1;]),
+ [dynamic_list=true], [], [true])
+ CFLAGS="$old_CFLAGS"
++ CPPFLAGS="$old_CPPFLAGS"
++ LIBS="$old_LIBS"
+ fi
+ LDFLAGS="$old_LDFLAGS"
+ fi
diff --git a/gdb.spec b/gdb.spec
index bd1be4a..70e4c24 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -28,7 +28,7 @@ Version: 7.4.50.%{snap}
# 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: 8%{?_with_upstream:.upstream}%{?dist}
+Release: 9%{?_with_upstream:.upstream}%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
Group: Development/Debuggers
@@ -538,13 +538,15 @@ Patch641: gdb-build-libgdb-3of3.patch
#=fedora
Patch642: gdb-readline62-ask-more-rh.patch
+# Enable smaller %{_bindir}/gdb in future by no longer using -rdynamic.
+#=push
+Patch643: gdb-python-rdynamic.patch
+
%if 0%{!?rhel:1} || 0%{?rhel} > 6
# RL_STATE_FEDORA_GDB would not be found for:
# Patch642: gdb-readline62-ask-more-rh.patch
# --with-system-readline
BuildRequires: readline-devel%{?_isa} >= 6.2-4.fc17
-%else
-BuildRequires: readline-devel%{?_isa}
%endif # 0%{!?rhel:1} || 0%{?rhel} > 6
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
@@ -664,7 +666,10 @@ machine than the one which is running the program being debugged.
Summary: Documentation for GDB (the GNU source-level debugger)
License: GFDL
Group: Documentation
+# It breaks RHEL-5 by %{_target_platform} being noarch-redhat-linux-gnu.
+%if 0%{!?el5:1}
BuildArch: noarch
+%endif # 0%{!?el5:1}
%description doc
GDB, the GNU debugger, allows you to debug programs written in C, C++,
@@ -805,6 +810,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
%patch639 -p1
%patch640 -p1
%patch641 -p1
+%patch643 -p1
%patch393 -p1
%patch335 -p1
@@ -897,7 +903,11 @@ CFLAGS="$CFLAGS -O0 -ggdb2"
--with-separate-debug-dir=/usr/lib/debug \
--disable-sim \
--disable-rpath \
- --with-system-readline \
+%if 0%{!?rhel:1} || 0%{?rhel} > 6
+ --with-system-readline \
+%else # 0%{!?rhel:1} || 0%{?rhel} > 6
+ --without-system-readline \
+%endif # 0%{!?rhel:1} || 0%{?rhel} > 6
--with-expat \
$(: ppc64 host build crashes on ppc variant of libexpat.so ) \
--without-libexpat-prefix \
@@ -1240,6 +1250,12 @@ fi
%{_infodir}/gdb.info*
%changelog
+* Thu Jan 19 2012 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.4.50.20120103-9.fc17
+- Enable smaller %{_bindir}/gdb in future by no longer using -rdynamic.
+- Make --enablerepo to use '*-debug*' for RHEL compatibility (BZ 781571).
+- On older RHELs make readline bundled again (BZ 701131).
+- Fix build compatibility with RHEL-5 due to false noarch build.
+
* Wed Jan 11 2012 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.4.50.20120103-8.fc17
- Disable unexpected GDB directories relocatability.
More information about the scm-commits
mailing list