From 642e08f4654dd5c6513ee358460f0c2f149e368f Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 6 Jul 2012 22:12:53 +0200 Subject: [PATCH] [RHEL] Disable MiniDebugInfo F-18 feature on RHEL <= 6 (BZ 834068). --- gdb-minidebuginfo.patch | 36 ++++++++++++++++++++---------------- gdb.spec | 16 ++++++++++++++-- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/gdb-minidebuginfo.patch b/gdb-minidebuginfo.patch index d60a66b..9a841a0 100644 --- a/gdb-minidebuginfo.patch +++ b/gdb-minidebuginfo.patch @@ -6,8 +6,8 @@ Review/modifications and testfile by Jan Kratochvil. Index: gdb-7.4.50.20120703/gdb/Makefile.in =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/Makefile.in 2012-07-05 22:47:39.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/Makefile.in 2012-07-05 22:47:45.475509372 +0200 +--- gdb-7.4.50.20120703.orig/gdb/Makefile.in 2012-07-06 21:44:57.243444217 +0200 ++++ gdb-7.4.50.20120703/gdb/Makefile.in 2012-07-06 21:44:57.768444937 +0200 @@ -151,6 +151,9 @@ READLINE_CFLAGS = @READLINE_CFLAGS@ # Where is expat? This will be empty if expat was not available. LIBEXPAT = @LIBEXPAT@ @@ -29,8 +29,8 @@ Index: gdb-7.4.50.20120703/gdb/Makefile.in $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) Index: gdb-7.4.50.20120703/gdb/config.in =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/config.in 2012-07-05 22:47:40.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/config.in 2012-07-05 22:47:45.476509371 +0200 +--- gdb-7.4.50.20120703.orig/gdb/config.in 2012-07-06 21:44:57.599444705 +0200 ++++ gdb-7.4.50.20120703/gdb/config.in 2012-07-06 21:44:57.769444938 +0200 @@ -198,6 +198,9 @@ /* Define to 1 if you have the `libiconvlist' function. */ #undef HAVE_LIBICONVLIST @@ -43,8 +43,8 @@ Index: gdb-7.4.50.20120703/gdb/config.in Index: gdb-7.4.50.20120703/gdb/configure =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/configure 2012-07-05 22:47:40.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/configure 2012-07-05 22:47:45.485509363 +0200 +--- gdb-7.4.50.20120703.orig/gdb/configure 2012-07-06 21:44:57.696444838 +0200 ++++ gdb-7.4.50.20120703/gdb/configure 2012-07-06 21:53:47.667170352 +0200 @@ -641,6 +641,9 @@ TCL_VERSION WIN32LDAPP GUI_CFLAGS_X @@ -74,7 +74,7 @@ Index: gdb-7.4.50.20120703/gdb/configure --with-tcl directory containing tcl configuration (tclConfig.sh) --with-tk directory containing tk configuration (tkConfig.sh) --with-x use the X Window System -@@ -13151,6 +13159,492 @@ LIBS=$OLD_LIBS +@@ -13151,6 +13159,494 @@ LIBS=$OLD_LIBS # Add any host-specific objects to GDB. CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" @@ -518,7 +518,9 @@ Index: gdb-7.4.50.20120703/gdb/configure +int +main () +{ -+lzma_mf_is_supported (LZMA_MF_HC3); ++lzma_index_iter iter; ++ lzma_index_iter_init (&iter, 0); ++ lzma_mf_is_supported (LZMA_MF_HC3); + ; + return 0; +} @@ -569,9 +571,9 @@ Index: gdb-7.4.50.20120703/gdb/configure Index: gdb-7.4.50.20120703/gdb/configure.ac =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/configure.ac 2012-07-05 22:47:40.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/configure.ac 2012-07-05 22:47:45.487509361 +0200 -@@ -2196,6 +2196,25 @@ LIBS=$OLD_LIBS +--- gdb-7.4.50.20120703.orig/gdb/configure.ac 2012-07-06 21:44:57.699444841 +0200 ++++ gdb-7.4.50.20120703/gdb/configure.ac 2012-07-06 21:53:29.875146225 +0200 +@@ -2196,6 +2196,27 @@ LIBS=$OLD_LIBS # Add any host-specific objects to GDB. CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" @@ -585,7 +587,9 @@ Index: gdb-7.4.50.20120703/gdb/configure.ac + + if test "${with_lzma}" != no; then + AC_LIB_HAVE_LINKFLAGS([lzma], [], [#include "lzma.h"], -+ [lzma_mf_is_supported (LZMA_MF_HC3);]) ++ [lzma_index_iter iter; ++ lzma_index_iter_init (&iter, 0); ++ lzma_mf_is_supported (LZMA_MF_HC3);]) + if test "$HAVE_LIBLZMA" != yes; then + if test "$with_lzma" = yes; then + AC_MSG_ERROR([missing liblzma for --with-lzma]) @@ -599,8 +603,8 @@ Index: gdb-7.4.50.20120703/gdb/configure.ac AC_SUBST(LIBGUI) Index: gdb-7.4.50.20120703/gdb/elfread.c =================================================================== ---- gdb-7.4.50.20120703.orig/gdb/elfread.c 2012-07-05 22:47:39.000000000 +0200 -+++ gdb-7.4.50.20120703/gdb/elfread.c 2012-07-05 22:49:13.200427038 +0200 +--- gdb-7.4.50.20120703.orig/gdb/elfread.c 2012-07-06 21:44:57.211444174 +0200 ++++ gdb-7.4.50.20120703/gdb/elfread.c 2012-07-06 21:44:57.800444979 +0200 @@ -51,6 +51,10 @@ #include "observer.h" #include "elf/external.h" @@ -910,7 +914,7 @@ Index: gdb-7.4.50.20120703/gdb/elfread.c Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.dwarf2/dw2-gnu-debugdata.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.dwarf2/dw2-gnu-debugdata.c 2012-07-05 22:47:45.488509360 +0200 ++++ gdb-7.4.50.20120703/gdb/testsuite/gdb.dwarf2/dw2-gnu-debugdata.c 2012-07-06 21:44:57.802444983 +0200 @@ -0,0 +1,30 @@ +/* This testcase is part of GDB, the GNU debugger. + @@ -945,7 +949,7 @@ Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.dwarf2/dw2-gnu-debugdata.c Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.dwarf2/dw2-gnu-debugdata.exp =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.dwarf2/dw2-gnu-debugdata.exp 2012-07-05 22:50:36.622348900 +0200 ++++ gdb-7.4.50.20120703/gdb/testsuite/gdb.dwarf2/dw2-gnu-debugdata.exp 2012-07-06 21:44:57.809444991 +0200 @@ -0,0 +1,91 @@ +# Copyright 2012 Free Software Foundation, Inc. +# diff --git a/gdb.spec b/gdb.spec index a041d69..90b10b6 100644 --- a/gdb.spec +++ b/gdb.spec @@ -35,7 +35,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: 12%{?dist} +Release: 13%{?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 @@ -581,7 +581,10 @@ BuildRequires: readline-devel%{?_isa} >= 6.2-4 %endif # 0%{!?rhel:1} || 0%{?rhel} > 6 BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison -BuildRequires: expat-devel%{?_isa} xz-devel%{?_isa} +BuildRequires: expat-devel%{?_isa} +%if 0%{!?rhel:1} || 0%{?rhel} > 6 +BuildRequires: xz-devel%{?_isa} +%endif %if 0%{!?el5:1} # dlopen() no longer makes rpm-libs%{?_isa} (it's .so) a mandatory dependency. BuildRequires: rpm-devel%{?_isa} @@ -676,7 +679,9 @@ BuildRequires: zlib-devel%{bits_local} zlib-devel%{bits_other} %ifarch %{ix86} x86_64 ppc ppc64 BuildRequires: valgrind%{bits_local} valgrind%{bits_other} %endif +%if 0%{!?rhel:1} || 0%{?rhel} > 6 BuildRequires: xz +%endif %endif # 0%{?_with_testsuite:1} @@ -969,7 +974,11 @@ $(: RHEL-5 librpm has incompatible API. ) \ --with-rpm=librpm.so.3 \ %endif %endif +%if 0%{!?rhel:1} || 0%{?rhel} > 6 --with-lzma \ +%else + --without-lzma \ +%endif %ifarch ia64 --with-libunwind \ %else @@ -1355,6 +1364,9 @@ fi %endif # 0%{!?el5:1} || "%{_target_cpu}" == "noarch" %changelog +* Fri Jul 6 2012 Jan Kratochvil - 7.4.50.20120703-13.fc18 +- [RHEL] Disable MiniDebugInfo F-18 feature on RHEL <= 6 (BZ 834068). + * Fri Jul 6 2012 Jan Kratochvil - 7.4.50.20120703-12.fc18 - Fix .spec metadata for the MiniDebugInfo F-18 feature (BZ 834068).