Index: contrib/crossrpms/rtems4.9/arm/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/arm/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/arm/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -20,5 +20,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/arm/rtems-4.9-arm-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/arm/rtems-4.9-arm-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/arm/rtems-4.9-arm-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-arm-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "arm-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/avr/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/avr/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/avr/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -19,5 +19,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/avr/rtems-4.9-avr-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/avr/rtems-4.9-avr-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/avr/rtems-4.9-avr-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-avr-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "avr-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/bfin/rtems-4.9-bfin-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/bfin/rtems-4.9-bfin-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/bfin/rtems-4.9-bfin-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "bfin-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -69,4 +76,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/h8300/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/h8300/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/h8300/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -20,5 +20,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-h8300-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "h8300-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/i386/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/i386/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/i386/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -20,5 +20,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-i386-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "i386-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/m68k/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/m68k/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/m68k/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -20,5 +20,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/m68k/rtems-4.9-m68k-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/m68k/rtems-4.9-m68k-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/m68k/rtems-4.9-m68k-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-m68k-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "m68k-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/mips/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/mips/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/mips/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -20,5 +20,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/mips/rtems-4.9-mips-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/mips/rtems-4.9-mips-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/mips/rtems-4.9-mips-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-mips-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "mips-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/mipstx39/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/mipstx39/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/mipstx39/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -8,5 +8,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/mipstx39/rtems-4.9-mipstx39-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/mipstx39/rtems-4.9-mipstx39-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/mipstx39/rtems-4.9-mipstx39-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-mipstx39-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "mipstx39-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/powerpc/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/powerpc/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/powerpc/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -20,5 +20,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/powerpc/rtems-4.9-powerpc-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/powerpc/rtems-4.9-powerpc-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/powerpc/rtems-4.9-powerpc-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-powerpc-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "powerpc-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/sh/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/sh/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/sh/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -20,5 +20,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 2%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/sh/rtems-4.9-sh-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/sh/rtems-4.9-sh-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/sh/rtems-4.9-sh-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-sh-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "sh-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
Index: contrib/crossrpms/rtems4.9/sparc/Makefile.am
===================================================================
--- contrib/crossrpms/rtems4.9/sparc/Makefile.am	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/sparc/Makefile.am	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -20,5 +20,5 @@
 GDB_VERS = 6.7.1
 GDB_PKGVERS = $(GDB_VERS)
-GDB_RPMREL = 3%{?dist}
+GDB_RPMREL = 4%{?dist}
 include ../gdb.am
 GDB_OPTS +=
Index: contrib/crossrpms/rtems4.9/sparc/rtems-4.9-sparc-rtems4.9-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.9/sparc/rtems-4.9-sparc-rtems4.9-gdb.spec	(revision 724eab7ad08d5d833ae55f038ebc53087120b956)
+++ contrib/crossrpms/rtems4.9/sparc/rtems-4.9-sparc-rtems4.9-gdb.spec	(revision 25eda206eba7b68e1a6c32ebc35ca3e5593283a3)
@@ -14,6 +14,6 @@
 %endif
 
-%define gdb_version 6.7
-%define gdb_rpmvers %{expand:%(echo 6.7 | tr - _)} 
+%define gdb_version 6.7.1
+%define gdb_rpmvers %{expand:%(echo 6.7.1 | tr - _)} 
 
 Name:		rtems-4.9-sparc-rtems4.9-gdb
@@ -21,5 +21,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	2%{?dist}
+Release:	4%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -27,7 +27,13 @@
 
 %if "%{gdb_version}" >= "6.6"
+# suse
 %if "%{?suse}"
-BuildRequires:	expat
-%else 
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+BuildRequires: expat
+%endif
+%else
+# fedora/redhat 
 BuildRequires:	expat-devel
 %endif
@@ -37,6 +43,7 @@
 BuildRequires:	texinfo >= 4.2
 %if "sparc-rtems4.9" == "sparc-rtems4.9"
-BuildRequires:	libtermcap-devel
-%endif
+BuildConflicts:	libtermcap-devel termcap-devel
+%endif
+BuildRequires:  readline-devel
 BuildRequires:	ncurses-devel
 
@@ -53,4 +60,7 @@
 %if "%{gdb_version}" == "6.7"
 Patch0:		gdb-6.7-rtems4.9-20071011.diff
+%endif
+%if "%{gdb_version}" == "6.7.1"
+Patch0:		gdb-6.7.1-rtems4.9-20071031.diff
 %endif
 
@@ -77,4 +87,8 @@
     --disable-werror \
     --enable-sim \
+%if "%{gdb_version}" >= "6.6"
+    --with-system-readline \
+    --with-expat \
+%endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
     --includedir=%{_includedir} --libdir=%{_libdir} \
