[rtems-crossrpms commit] gdb-7.7

Ralf Corsepius ralf at rtems.org
Thu May 8 11:04:59 UTC 2014


Module:    rtems-crossrpms
Branch:    master
Commit:    af9421db1eb0d02750fecb60de5e3853057283df
Changeset: http://git.rtems.org/rtems-crossrpms/commit/?id=af9421db1eb0d02750fecb60de5e3853057283df

Author:    Ralf Corsépius <ralf.corsepius at rtems.org>
Date:      Fri Feb  7 06:33:56 2014 +0100

gdb-7.7

---

 rtems4.11/arm/Makefile.am                          |    2 +-
 rtems4.11/arm/Makefile.in                          |    2 +-
 rtems4.11/arm/gdb-sources.add                      |    4 ++
 rtems4.11/arm/rtems-4.11-arm-rtems4.11-gdb.spec    |   38 ++++++++++++++++---
 rtems4.11/avr/Makefile.am                          |    2 +-
 rtems4.11/avr/Makefile.in                          |    2 +-
 rtems4.11/avr/gdb-sources.add                      |    4 ++
 rtems4.11/avr/rtems-4.11-avr-rtems4.11-gdb.spec    |   38 ++++++++++++++++---
 rtems4.11/bfin/Makefile.am                         |    2 +-
 rtems4.11/bfin/Makefile.in                         |    2 +-
 rtems4.11/bfin/gdb-sources.add                     |    4 ++
 rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 rtems4.11/h8300/Makefile.am                        |    2 +-
 rtems4.11/h8300/Makefile.in                        |    2 +-
 rtems4.11/h8300/gdb-sources.add                    |    4 ++
 .../h8300/rtems-4.11-h8300-rtems4.11-gdb.spec      |   38 ++++++++++++++++---
 rtems4.11/i386/Makefile.am                         |    2 +-
 rtems4.11/i386/Makefile.in                         |    2 +-
 rtems4.11/i386/gdb-sources.add                     |    4 ++
 rtems4.11/i386/rtems-4.11-i386-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 rtems4.11/lm32/Makefile.am                         |    2 +-
 rtems4.11/lm32/Makefile.in                         |    2 +-
 rtems4.11/lm32/gdb-sources.add                     |    4 ++
 rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 rtems4.11/m32c/Makefile.am                         |    2 +-
 rtems4.11/m32c/Makefile.in                         |    2 +-
 rtems4.11/m32c/gdb-sources.add                     |    4 ++
 rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 rtems4.11/m32r/Makefile.am                         |    2 +-
 rtems4.11/m32r/Makefile.in                         |    2 +-
 rtems4.11/m32r/gdb-sources.add                     |    4 ++
 rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 rtems4.11/m68k/Makefile.am                         |    2 +-
 rtems4.11/m68k/Makefile.in                         |    2 +-
 rtems4.11/m68k/gdb-sources.add                     |    4 ++
 rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 rtems4.11/microblaze/Makefile.am                   |    2 +-
 rtems4.11/microblaze/Makefile.in                   |    2 +-
 rtems4.11/microblaze/gdb-sources.add               |    4 ++
 .../rtems-4.11-microblaze-rtems4.11-gdb.spec       |   38 ++++++++++++++++---
 rtems4.11/mips/Makefile.am                         |    2 +-
 rtems4.11/mips/Makefile.in                         |    2 +-
 rtems4.11/mips/gdb-sources.add                     |    4 ++
 rtems4.11/mips/rtems-4.11-mips-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 rtems4.11/mipstx39/Makefile.am                     |    2 +-
 rtems4.11/mipstx39/Makefile.in                     |    2 +-
 rtems4.11/mipstx39/gdb-sources.add                 |    4 ++
 .../rtems-4.11-mipstx39-rtems4.11-gdb.spec         |   38 ++++++++++++++++---
 rtems4.11/powerpc/Makefile.am                      |    2 +-
 rtems4.11/powerpc/Makefile.in                      |    2 +-
 rtems4.11/powerpc/gdb-sources.add                  |    4 ++
 .../powerpc/rtems-4.11-powerpc-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 rtems4.11/sh/Makefile.am                           |    2 +-
 rtems4.11/sh/Makefile.in                           |    2 +-
 rtems4.11/sh/gdb-sources.add                       |    4 ++
 rtems4.11/sh/rtems-4.11-sh-rtems4.11-gdb.spec      |   38 ++++++++++++++++---
 rtems4.11/sparc/Makefile.am                        |    2 +-
 rtems4.11/sparc/Makefile.in                        |    2 +-
 rtems4.11/sparc/gdb-sources.add                    |    4 ++
 .../sparc/rtems-4.11-sparc-rtems4.11-gdb.spec      |   38 ++++++++++++++++---
 rtems4.11/sparc64/Makefile.am                      |    2 +-
 rtems4.11/sparc64/Makefile.in                      |    2 +-
 rtems4.11/sparc64/gdb-sources.add                  |    4 ++
 .../sparc64/rtems-4.11-sparc64-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 rtems4.11/v850/Makefile.am                         |    2 +-
 rtems4.11/v850/Makefile.in                         |    2 +-
 rtems4.11/v850/gdb-sources.add                     |    4 ++
 rtems4.11/v850/rtems-4.11-v850-rtems4.11-gdb.spec  |   38 ++++++++++++++++---
 68 files changed, 646 insertions(+), 136 deletions(-)

diff --git a/rtems4.11/arm/Makefile.am b/rtems4.11/arm/Makefile.am
index 8d19176..98be21d 100644
--- a/rtems4.11/arm/Makefile.am
+++ b/rtems4.11/arm/Makefile.am
@@ -19,7 +19,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/arm/Makefile.in b/rtems4.11/arm/Makefile.in
index a35c20f..3268e50 100644
--- a/rtems4.11/arm/Makefile.in
+++ b/rtems4.11/arm/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/arm/gdb-sources.add b/rtems4.11/arm/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/arm/gdb-sources.add
+++ b/rtems4.11/arm/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gdb.spec b/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gdb.spec
index f3847e5..d0e8a27 100644
--- a/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gdb.spec
+++ b/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-arm-rtems4.11-gdb
 Summary:	Gdb for target arm-rtems4.11
@@ -102,6 +102,10 @@ BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 Obsoletes:	rtems-4.11-arm-rtemseabi4.11-gdb < %{version}-%{release}
 Provides:	rtems-4.11-arm-rtemseabi4.11-gdb = %{version}-%{release}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -197,12 +201,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/arm-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/arm-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/arm-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/arm-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/arm-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -228,7 +243,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -248,7 +263,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting arm-rtems4.11.
 
 %files -n rtems-4.11-arm-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/arm-rtems4.11-gdb-%{gdb_version}}
@@ -257,6 +272,11 @@ GNU gdb targetting arm-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/arm-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/arm-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/arm-rtems4.11-*
 
@@ -276,20 +296,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -297,7 +321,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/avr/Makefile.am b/rtems4.11/avr/Makefile.am
index 7f4062b..01ecdd5 100644
--- a/rtems4.11/avr/Makefile.am
+++ b/rtems4.11/avr/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 22`
 include ../gcc.am
 GCC_OPTS +=
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/avr/Makefile.in b/rtems4.11/avr/Makefile.in
index 36dd18f..01b15fc 100644
--- a/rtems4.11/avr/Makefile.in
+++ b/rtems4.11/avr/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/avr/gdb-sources.add b/rtems4.11/avr/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/avr/gdb-sources.add
+++ b/rtems4.11/avr/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gdb.spec b/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gdb.spec
index 4a8613e..42a8a5c 100644
--- a/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gdb.spec
+++ b/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-avr-rtems4.11-gdb
 Summary:	Gdb for target avr-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/avr-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/avr-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/avr-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/avr-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/avr-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting avr-rtems4.11.
 
 %files -n rtems-4.11-avr-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/avr-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting avr-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/avr-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/avr-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/avr-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/bfin/Makefile.am b/rtems4.11/bfin/Makefile.am
index b78479d..270eff4 100644
--- a/rtems4.11/bfin/Makefile.am
+++ b/rtems4.11/bfin/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/bfin/Makefile.in b/rtems4.11/bfin/Makefile.in
index da8d97e..33e0e2a 100644
--- a/rtems4.11/bfin/Makefile.in
+++ b/rtems4.11/bfin/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/bfin/gdb-sources.add b/rtems4.11/bfin/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/bfin/gdb-sources.add
+++ b/rtems4.11/bfin/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gdb.spec b/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gdb.spec
index 0672e85..5dcf9b3 100644
--- a/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gdb.spec
+++ b/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-bfin-rtems4.11-gdb
 Summary:	Gdb for target bfin-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/bfin-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/bfin-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/bfin-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/bfin-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/bfin-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting bfin-rtems4.11.
 
 %files -n rtems-4.11-bfin-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/bfin-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting bfin-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/bfin-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/bfin-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/bfin-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/h8300/Makefile.am b/rtems4.11/h8300/Makefile.am
index 756aa9d..11ed910 100644
--- a/rtems4.11/h8300/Makefile.am
+++ b/rtems4.11/h8300/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/h8300/Makefile.in b/rtems4.11/h8300/Makefile.in
index 115e145..a44fcc7 100644
--- a/rtems4.11/h8300/Makefile.in
+++ b/rtems4.11/h8300/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/h8300/gdb-sources.add b/rtems4.11/h8300/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/h8300/gdb-sources.add
+++ b/rtems4.11/h8300/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gdb.spec b/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gdb.spec
index 645ebce..43b2b11 100644
--- a/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gdb.spec
+++ b/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-h8300-rtems4.11-gdb
 Summary:	Gdb for target h8300-rtems4.11
@@ -103,6 +103,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -198,12 +202,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/h8300-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/h8300-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/h8300-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/h8300-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/h8300-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -229,7 +244,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -249,7 +264,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting h8300-rtems4.11.
 
 %files -n rtems-4.11-h8300-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/h8300-rtems4.11-gdb-%{gdb_version}}
@@ -258,6 +273,11 @@ GNU gdb targetting h8300-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/h8300-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/h8300-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/h8300-rtems4.11-*
 
@@ -277,20 +297,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -298,7 +322,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/i386/Makefile.am b/rtems4.11/i386/Makefile.am
index e964595..5df2d0a 100644
--- a/rtems4.11/i386/Makefile.am
+++ b/rtems4.11/i386/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/i386/Makefile.in b/rtems4.11/i386/Makefile.in
index d996a1f..6ea9d21 100644
--- a/rtems4.11/i386/Makefile.in
+++ b/rtems4.11/i386/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/i386/gdb-sources.add b/rtems4.11/i386/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/i386/gdb-sources.add
+++ b/rtems4.11/i386/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gdb.spec b/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gdb.spec
index 55abf13..86311cc 100644
--- a/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gdb.spec
+++ b/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-i386-rtems4.11-gdb
 Summary:	Gdb for target i386-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/i386-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/i386-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/i386-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/i386-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting i386-rtems4.11.
 
 %files -n rtems-4.11-i386-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/i386-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting i386-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/i386-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/i386-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/i386-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/lm32/Makefile.am b/rtems4.11/lm32/Makefile.am
index 801933c..c03e6f3 100644
--- a/rtems4.11/lm32/Makefile.am
+++ b/rtems4.11/lm32/Makefile.am
@@ -23,7 +23,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 6`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/lm32/Makefile.in b/rtems4.11/lm32/Makefile.in
index 2edac61..557fb21 100644
--- a/rtems4.11/lm32/Makefile.in
+++ b/rtems4.11/lm32/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/lm32/gdb-sources.add b/rtems4.11/lm32/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/lm32/gdb-sources.add
+++ b/rtems4.11/lm32/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gdb.spec b/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gdb.spec
index ec1e032..5badf12 100644
--- a/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gdb.spec
+++ b/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-lm32-rtems4.11-gdb
 Summary:	Gdb for target lm32-rtems4.11
@@ -103,6 +103,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -198,12 +202,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/lm32-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/lm32-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/lm32-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/lm32-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/lm32-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -229,7 +244,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -249,7 +264,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting lm32-rtems4.11.
 
 %files -n rtems-4.11-lm32-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/lm32-rtems4.11-gdb-%{gdb_version}}
@@ -258,6 +273,11 @@ GNU gdb targetting lm32-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/lm32-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/lm32-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/lm32-rtems4.11-*
 
@@ -277,20 +297,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -298,7 +322,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/m32c/Makefile.am b/rtems4.11/m32c/Makefile.am
index ed06a07..e496f94 100644
--- a/rtems4.11/m32c/Makefile.am
+++ b/rtems4.11/m32c/Makefile.am
@@ -22,7 +22,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 22`
 include ../gcc.am
 GCC_OPTS +=
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/m32c/Makefile.in b/rtems4.11/m32c/Makefile.in
index fd7c88c..f955872 100644
--- a/rtems4.11/m32c/Makefile.in
+++ b/rtems4.11/m32c/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/m32c/gdb-sources.add b/rtems4.11/m32c/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/m32c/gdb-sources.add
+++ b/rtems4.11/m32c/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gdb.spec b/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gdb.spec
index 73887dd..f3607d7 100644
--- a/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gdb.spec
+++ b/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-m32c-rtems4.11-gdb
 Summary:	Gdb for target m32c-rtems4.11
@@ -103,6 +103,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -198,12 +202,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/m32c-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/m32c-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/m32c-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/m32c-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/m32c-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -229,7 +244,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -249,7 +264,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting m32c-rtems4.11.
 
 %files -n rtems-4.11-m32c-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/m32c-rtems4.11-gdb-%{gdb_version}}
@@ -258,6 +273,11 @@ GNU gdb targetting m32c-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/m32c-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/m32c-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/m32c-rtems4.11-*
 
@@ -277,20 +297,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -298,7 +322,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/m32r/Makefile.am b/rtems4.11/m32r/Makefile.am
index 7efcaa2..f82f52c 100644
--- a/rtems4.11/m32r/Makefile.am
+++ b/rtems4.11/m32r/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/m32r/Makefile.in b/rtems4.11/m32r/Makefile.in
index fb42ea5..6c2a30f 100644
--- a/rtems4.11/m32r/Makefile.in
+++ b/rtems4.11/m32r/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/m32r/gdb-sources.add b/rtems4.11/m32r/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/m32r/gdb-sources.add
+++ b/rtems4.11/m32r/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gdb.spec b/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gdb.spec
index 5c9a638..449e519 100644
--- a/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gdb.spec
+++ b/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-m32r-rtems4.11-gdb
 Summary:	Gdb for target m32r-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/m32r-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/m32r-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/m32r-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/m32r-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/m32r-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting m32r-rtems4.11.
 
 %files -n rtems-4.11-m32r-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/m32r-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting m32r-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/m32r-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/m32r-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/m32r-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/m68k/Makefile.am b/rtems4.11/m68k/Makefile.am
index d26847e..431cf54 100644
--- a/rtems4.11/m68k/Makefile.am
+++ b/rtems4.11/m68k/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/m68k/Makefile.in b/rtems4.11/m68k/Makefile.in
index 6735540..ef27323 100644
--- a/rtems4.11/m68k/Makefile.in
+++ b/rtems4.11/m68k/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/m68k/gdb-sources.add b/rtems4.11/m68k/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/m68k/gdb-sources.add
+++ b/rtems4.11/m68k/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gdb.spec b/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gdb.spec
index 82791ec..020e165 100644
--- a/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gdb.spec
+++ b/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-m68k-rtems4.11-gdb
 Summary:	Gdb for target m68k-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/m68k-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/m68k-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/m68k-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/m68k-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/m68k-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting m68k-rtems4.11.
 
 %files -n rtems-4.11-m68k-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/m68k-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting m68k-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/m68k-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/m68k-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/m68k-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/microblaze/Makefile.am b/rtems4.11/microblaze/Makefile.am
index 5751066..032bf97 100644
--- a/rtems4.11/microblaze/Makefile.am
+++ b/rtems4.11/microblaze/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/microblaze/Makefile.in b/rtems4.11/microblaze/Makefile.in
index 1f07564..0fdf61a 100644
--- a/rtems4.11/microblaze/Makefile.in
+++ b/rtems4.11/microblaze/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/microblaze/gdb-sources.add b/rtems4.11/microblaze/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/microblaze/gdb-sources.add
+++ b/rtems4.11/microblaze/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gdb.spec b/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gdb.spec
index e4e0553..5651562 100644
--- a/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gdb.spec
+++ b/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-microblaze-rtems4.11-gdb
 Summary:	Gdb for target microblaze-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/microblaze-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/microblaze-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/microblaze-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/microblaze-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/microblaze-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting microblaze-rtems4.11.
 
 %files -n rtems-4.11-microblaze-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/microblaze-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting microblaze-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/microblaze-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/microblaze-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/microblaze-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/mips/Makefile.am b/rtems4.11/mips/Makefile.am
index 001bd6c..82f246e 100644
--- a/rtems4.11/mips/Makefile.am
+++ b/rtems4.11/mips/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/mips/Makefile.in b/rtems4.11/mips/Makefile.in
index f82ac1f..45cc929 100644
--- a/rtems4.11/mips/Makefile.in
+++ b/rtems4.11/mips/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/mips/gdb-sources.add b/rtems4.11/mips/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/mips/gdb-sources.add
+++ b/rtems4.11/mips/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gdb.spec b/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gdb.spec
index b0d0013..bdb6b76 100644
--- a/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gdb.spec
+++ b/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-mips-rtems4.11-gdb
 Summary:	Gdb for target mips-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/mips-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/mips-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/mips-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/mips-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/mips-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting mips-rtems4.11.
 
 %files -n rtems-4.11-mips-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/mips-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting mips-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/mips-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/mips-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/mips-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/mipstx39/Makefile.am b/rtems4.11/mipstx39/Makefile.am
index e489906..18f793e 100644
--- a/rtems4.11/mipstx39/Makefile.am
+++ b/rtems4.11/mipstx39/Makefile.am
@@ -4,7 +4,7 @@ TARGET = mipstx39-rtems4.11
 include $(top_srcdir)/mkspec.am
 
 # We only want a gdb with a tx39 simulator in it.  We share the other tools
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/mipstx39/Makefile.in b/rtems4.11/mipstx39/Makefile.in
index 3bb43e0..011de11 100644
--- a/rtems4.11/mipstx39/Makefile.in
+++ b/rtems4.11/mipstx39/Makefile.in
@@ -217,7 +217,7 @@ MKSPEC0 = sed \
 
 
 # We only want a gdb with a tx39 simulator in it.  We share the other tools
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/mipstx39/gdb-sources.add b/rtems4.11/mipstx39/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/mipstx39/gdb-sources.add
+++ b/rtems4.11/mipstx39/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/mipstx39/rtems-4.11-mipstx39-rtems4.11-gdb.spec b/rtems4.11/mipstx39/rtems-4.11-mipstx39-rtems4.11-gdb.spec
index 1cf22fd..b746643 100644
--- a/rtems4.11/mipstx39/rtems-4.11-mipstx39-rtems4.11-gdb.spec
+++ b/rtems4.11/mipstx39/rtems-4.11-mipstx39-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-mipstx39-rtems4.11-gdb
 Summary:	Gdb for target mipstx39-rtems4.11
@@ -103,6 +103,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -198,12 +202,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/mipstx39-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/mipstx39-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/mipstx39-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/mipstx39-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/mipstx39-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -229,7 +244,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -249,7 +264,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting mipstx39-rtems4.11.
 
 %files -n rtems-4.11-mipstx39-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/mipstx39-rtems4.11-gdb-%{gdb_version}}
@@ -258,6 +273,11 @@ GNU gdb targetting mipstx39-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/mipstx39-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/mipstx39-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/mipstx39-rtems4.11-*
 
@@ -277,20 +297,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -298,7 +322,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/powerpc/Makefile.am b/rtems4.11/powerpc/Makefile.am
index cb7b0a5..8952b02 100644
--- a/rtems4.11/powerpc/Makefile.am
+++ b/rtems4.11/powerpc/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/powerpc/Makefile.in b/rtems4.11/powerpc/Makefile.in
index 0e546df..c2f9eed 100644
--- a/rtems4.11/powerpc/Makefile.in
+++ b/rtems4.11/powerpc/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/powerpc/gdb-sources.add b/rtems4.11/powerpc/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/powerpc/gdb-sources.add
+++ b/rtems4.11/powerpc/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gdb.spec b/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gdb.spec
index 4686aba..01fb39e 100644
--- a/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gdb.spec
+++ b/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-powerpc-rtems4.11-gdb
 Summary:	Gdb for target powerpc-rtems4.11
@@ -105,6 +105,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -200,12 +204,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/powerpc-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/powerpc-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/powerpc-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/powerpc-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/powerpc-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -231,7 +246,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -251,7 +266,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting powerpc-rtems4.11.
 
 %files -n rtems-4.11-powerpc-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/powerpc-rtems4.11-gdb-%{gdb_version}}
@@ -260,6 +275,11 @@ GNU gdb targetting powerpc-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/powerpc-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/powerpc-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/powerpc-rtems4.11-*
 
@@ -279,20 +299,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -300,7 +324,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/sh/Makefile.am b/rtems4.11/sh/Makefile.am
index 986eb4b..8ec90da 100644
--- a/rtems4.11/sh/Makefile.am
+++ b/rtems4.11/sh/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/sh/Makefile.in b/rtems4.11/sh/Makefile.in
index ddefec0..9136d7d 100644
--- a/rtems4.11/sh/Makefile.in
+++ b/rtems4.11/sh/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/sh/gdb-sources.add b/rtems4.11/sh/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/sh/gdb-sources.add
+++ b/rtems4.11/sh/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gdb.spec b/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gdb.spec
index db64301..7079fc7 100644
--- a/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gdb.spec
+++ b/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-sh-rtems4.11-gdb
 Summary:	Gdb for target sh-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/sh-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/sh-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/sh-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/sh-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/sh-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting sh-rtems4.11.
 
 %files -n rtems-4.11-sh-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/sh-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting sh-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/sh-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/sh-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/sh-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/sparc/Makefile.am b/rtems4.11/sparc/Makefile.am
index 877bfd3..71faf91 100644
--- a/rtems4.11/sparc/Makefile.am
+++ b/rtems4.11/sparc/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/sparc/Makefile.in b/rtems4.11/sparc/Makefile.in
index 8d0720e..905fab7 100644
--- a/rtems4.11/sparc/Makefile.in
+++ b/rtems4.11/sparc/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/sparc/gdb-sources.add b/rtems4.11/sparc/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/sparc/gdb-sources.add
+++ b/rtems4.11/sparc/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gdb.spec b/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gdb.spec
index 47b34be..ceeed5f 100644
--- a/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gdb.spec
+++ b/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-sparc-rtems4.11-gdb
 Summary:	Gdb for target sparc-rtems4.11
@@ -103,6 +103,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -198,12 +202,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/sparc-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/sparc-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/sparc-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/sparc-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/sparc-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -229,7 +244,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -249,7 +264,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting sparc-rtems4.11.
 
 %files -n rtems-4.11-sparc-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/sparc-rtems4.11-gdb-%{gdb_version}}
@@ -258,6 +273,11 @@ GNU gdb targetting sparc-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/sparc-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/sparc-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/sparc-rtems4.11-*
 
@@ -277,20 +297,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -298,7 +322,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/sparc64/Makefile.am b/rtems4.11/sparc64/Makefile.am
index 6c42c48..a83b3f2 100644
--- a/rtems4.11/sparc64/Makefile.am
+++ b/rtems4.11/sparc64/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/sparc64/Makefile.in b/rtems4.11/sparc64/Makefile.in
index 516c620..6bfa2c4 100644
--- a/rtems4.11/sparc64/Makefile.in
+++ b/rtems4.11/sparc64/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/sparc64/gdb-sources.add b/rtems4.11/sparc64/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/sparc64/gdb-sources.add
+++ b/rtems4.11/sparc64/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gdb.spec b/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gdb.spec
index ffbb111..c0c9249 100644
--- a/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gdb.spec
+++ b/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-sparc64-rtems4.11-gdb
 Summary:	Gdb for target sparc64-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/sparc64-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/sparc64-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/sparc64-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/sparc64-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/sparc64-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting sparc64-rtems4.11.
 
 %files -n rtems-4.11-sparc64-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/sparc64-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting sparc64-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/sparc64-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/sparc64-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/sparc64-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 
diff --git a/rtems4.11/v850/Makefile.am b/rtems4.11/v850/Makefile.am
index 6d5bca9..5ab2ef9 100644
--- a/rtems4.11/v850/Makefile.am
+++ b/rtems4.11/v850/Makefile.am
@@ -18,7 +18,7 @@ NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 26`
 include ../gcc.am
 GCC_OPTS += --languages=cxx
 
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 include ../gdb.am
diff --git a/rtems4.11/v850/Makefile.in b/rtems4.11/v850/Makefile.in
index 1479d70..d7cfd54 100644
--- a/rtems4.11/v850/Makefile.in
+++ b/rtems4.11/v850/Makefile.in
@@ -257,7 +257,7 @@ GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
 	$(top_srcdir)/gcc/target-objc.add \
 	$(top_srcdir)/gcc/target-newlib.add \
 	$(top_srcdir)/gcc/base-newlib.add
-GDB_VERS = 7.6.2
+GDB_VERS = 7.7
 GDB_PKGVERS = $(GDB_VERS)
 GDB_RPMREL = 1
 GDB_OPTS =
diff --git a/rtems4.11/v850/gdb-sources.add b/rtems4.11/v850/gdb-sources.add
index 7ed230c..4eb7d63 100644
--- a/rtems4.11/v850/gdb-sources.add
+++ b/rtems4.11/v850/gdb-sources.add
@@ -1,3 +1,7 @@
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
diff --git a/rtems4.11/v850/rtems-4.11-v850-rtems4.11-gdb.spec b/rtems4.11/v850/rtems-4.11-v850-rtems4.11-gdb.spec
index db007c7..8a3ea6d 100644
--- a/rtems4.11/v850/rtems-4.11-v850-rtems4.11-gdb.spec
+++ b/rtems4.11/v850/rtems-4.11-v850-rtems4.11-gdb.spec
@@ -46,8 +46,8 @@
 %endif
 
 %{?!el5:%global _with_noarch_subpackages 1}
-%define gdb_version 7.6.2
-%define gdb_rpmvers %{expand:%(echo 7.6.2 | tr - _)} 
+%define gdb_version 7.7
+%define gdb_rpmvers %{expand:%(echo 7.7 | tr - _)}
 
 Name:		rtems-4.11-v850-rtems4.11-gdb
 Summary:	Gdb for target v850-rtems4.11
@@ -99,6 +99,10 @@ BuildRequires:	/sbin/install-info
 Requires:	rtems-4.11-gdb-common
 BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo}
 
+%if "%{gdb_version}" == "7.7"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.7.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.7-rtems4.11-20140206.diff
+%endif
 %if "%{gdb_version}" == "7.6.2"
 Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.bz2
 Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.6.2-rtems4.11-20131208.diff
@@ -194,12 +198,23 @@ cd ..
 %endif
 
 %if "%{gdb_version}" >= "7.3.91"
-# gdb-7.3.91 installs host files, we don't want
+# gdb >= 7.3.91 installs host files, we don't want
   rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
 %endif
 
   cd ..
 
+%if "%{gdb_version}" == "7.7"
+# gdb-7.7 misses to canonicalize man-pages
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdb.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/v850-rtems4.11-gdb.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/gdbserver.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/v850-rtems4.11-gdbserver.1
+  mv ${RPM_BUILD_ROOT}%{_mandir}/man5/gdbinit.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/v850-rtems4.11-gdbinit.5
+
+# not useful for us.
+  rm -f ${RPM_BUILD_ROOT}%{_datadir}/v850-rtems4.11-gdb-%{gdb_version}/system-gdbinit/{wrs-linux,elinos}.*
+  rmdir ${RPM_BUILD_ROOT}%{_datadir}/v850-rtems4.11-gdb-%{gdb_version}/system-gdbinit
+%endif
+
 # Extract %%__os_install_post into os_install_post~
 cat << \EOF > os_install_post~
 %__os_install_post
@@ -225,7 +240,7 @@ done
 
 sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
   -e 's,^\s*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
-< os_install_post~ > os_install_post 
+< os_install_post~ > os_install_post
 %define __os_install_post . ./os_install_post
 
 %clean
@@ -245,7 +260,7 @@ sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
 GNU gdb targetting v850-rtems4.11.
 
 %files -n rtems-4.11-v850-rtems4.11-gdb
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 %{?with_python:%{_datadir}/v850-rtems4.11-gdb-%{gdb_version}}
@@ -254,6 +269,11 @@ GNU gdb targetting v850-rtems4.11.
 %dir %{_mandir}/man1
 %{_mandir}/man1/v850-rtems4.11-*.1*
 
+%if "%{gdb_version}" >= "7.7"
+%dir %{_mandir}/man5
+%{_mandir}/man5/v850-rtems4.11-*.5*
+%endif
+
 %dir %{_bindir}
 %{_bindir}/v850-rtems4.11-*
 
@@ -273,20 +293,24 @@ GDB files shared by all targets.
 
 %post -n rtems-4.11-gdb-common
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 
 %preun -n rtems-4.11-gdb-common
 if [ $1 -eq 0 ]; then
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+%if "%{gdb_version}" < "7.7"
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+%endif
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
   /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
 fi
 
 %files -n rtems-4.11-gdb-common
-%defattr(-,root,root)
+%{?el5:%defattr(-,root,root)}
 %dir %{_prefix}
 %dir %{_prefix}/share
 
@@ -294,7 +318,9 @@ fi
 %ghost %{_infodir}/dir
 %{_infodir}/gdb.info*
 
+%if "%{gdb_version}" < "7.7"
 %{_infodir}/gdbint.info*
+%endif
 %{_infodir}/stabs.info*
 %{_infodir}/annotate.info*
 




More information about the vc mailing list