From cebf6f9af9da52c18ee04fd1d149e7d6f3b80c52 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Thu, 2 Jul 2015 22:50:37 +0200 Subject: [PATCH] [RHEL] Use Python2, disable Guile. --- gdb-upstream.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++ gdb.spec | 24 ++++++++++++++++----- 2 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 gdb-upstream.patch diff --git a/gdb-upstream.patch b/gdb-upstream.patch new file mode 100644 index 0000000..e1d6f53 --- /dev/null +++ b/gdb-upstream.patch @@ -0,0 +1,52 @@ +From decf8d9a5f91912768d52cd075b6a25617a90d1c Mon Sep 17 00:00:00 2001 +From: Jan Kratochvil +Date: Thu, 2 Jul 2015 22:39:57 +0200 +Subject: [PATCH] Fix GCC false warning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +At least on + gcc-4.4.7-11.el6.i686 + ./configure --enable-64-bit-bfd --enable-targets=all +GDB does not build due to: + cc1: warnings being treated as errors + s390-linux-tdep.c: In function ‘s390_handle_arg’: + s390-linux-tdep.c:2575: error: ‘val’ may be used uninitialized in this function + +gdb/ChangeLog +2015-07-02 Jan Kratochvil + + Fix GCC false warning. + * s390-linux-tdep.c (s390_handle_arg): Initialize VAL. +--- + gdb/ChangeLog | 5 +++++ + gdb/s390-linux-tdep.c | 3 ++- + 2 files changed, 7 insertions(+), 1 deletion(-) + +### a/gdb/ChangeLog +### b/gdb/ChangeLog +## -1,3 +1,8 @@ ++2015-07-02 Jan Kratochvil ++ ++ Fix GCC false warning. ++ * s390-linux-tdep.c (s390_handle_arg): Initialize VAL. ++ + 2015-07-02 Yao Qi + + * aarch64-linux-nat.c (aarch64_linux_insert_hw_breakpoint): Fix +--- a/gdb/s390-linux-tdep.c ++++ b/gdb/s390-linux-tdep.c +@@ -2572,7 +2572,8 @@ s390_handle_arg (struct s390_arg_state *as, struct value *arg, + } + else if (s390_function_arg_integer (type) && length <= word_size) + { +- ULONGEST val; ++ /* Initialize it just to avoid a GCC false warning. */ ++ ULONGEST val = 0; + + if (write_mode) + { +-- +2.1.0 + diff --git a/gdb.spec b/gdb.spec index b22af87..b3d6976 100644 --- a/gdb.spec +++ b/gdb.spec @@ -26,7 +26,7 @@ Version: 7.9.50.%{snapsrc} # 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: 3%{?dist} +Release: 4%{?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 @@ -216,7 +216,7 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch # Backported fixups post the source tarball. #Xdrop: Just backports. -#Patch232: gdb-upstream.patch +Patch232: gdb-upstream.patch # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000). #=fedoratest+ppc @@ -535,8 +535,12 @@ BuildRequires: xz-devel%{?_isa} BuildRequires: rpm-devel%{?_isa} BuildRequires: zlib-devel%{?_isa} libselinux-devel%{?_isa} %if 0%{!?_without_python:1} +%if 0%{?rhel:1} && 0%{?rhel} <= 7 +BuildRequires: python-devel%{?_isa} +%else %global __python %{__python3} BuildRequires: python3-devel%{?_isa} +%endif %if 0%{?rhel:1} && 0%{?rhel} <= 6 # Temporarily before python files get moved to libstdc++.rpm # libstdc++%{bits_other} is not present in Koji, the .spec script generating @@ -553,8 +557,8 @@ BuildRequires: texlive-collection-latexrecommended BuildRequires: /usr/bin/pod2man %if 0%{!?rhel:1} BuildRequires: libbabeltrace-devel%{?_isa} -%endif BuildRequires: guile-devel%{?_isa} +%endif %if 0%{?_with_testsuite:1} @@ -696,7 +700,7 @@ find -name "*.info*"|xargs rm -f # Match the Fedora's version info. %patch2 -p1 -#patch232 -p1 +%patch232 -p1 %patch349 -p1 %patch888 -p1 %patch983 -p1 @@ -894,11 +898,12 @@ CFLAGS="$CFLAGS -DDNF_DEBUGINFO_INSTALL" --with-separate-debug-dir=/usr/lib/debug \ --disable-sim \ --disable-rpath \ - --with-guile \ %if 0%{!?rhel:1} --with-babeltrace \ + --with-guile \ %else --without-babeltrace \ + --without-guile \ %endif %if 0%{!?rhel:1} || 0%{?rhel} > 6 --with-system-readline \ @@ -1205,6 +1210,12 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/stabs* rm -f $RPM_BUILD_ROOT%{_infodir}/dir +%if 0%{?rhel:1} +# /usr/share/gdb/guile/ gets installed even --without-guile +# https://sourceware.org/bugzilla/show_bug.cgi?id=17105 +rm -rf $RPM_BUILD_ROOT%{_datadir}/gdb/guile +%endif + # These files are unrelated to Fedora Linux. rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit/elinos.py rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/system-gdbinit/wrs-linux.py @@ -1303,6 +1314,9 @@ then fi %changelog +* Thu Jul 2 2015 Jan Kratochvil - 7.9.50.20150531-4.fc23 +- [RHEL] Use Python2, disable Guile. + * Fri Jun 26 2015 Jan Kratochvil - 7.9.50.20150531-3.fc23 - Fix 'info type-printers' Python error (Clem Dickey, RH BZ 1085576).