Index: contrib/crossrpms/rtems4.8/arm/rtems-4.8-arm-rtems4.8-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.8/arm/rtems-4.8-arm-rtems4.8-gdb.spec	(revision cd8dd21b63fdd3d26b7dcd0bd9cdf4abffafe685)
+++ contrib/crossrpms/rtems4.8/arm/rtems-4.8-arm-rtems4.8-gdb.spec	(revision a3edc1b8d278e3a8f7c1f2afd230c272df46a4cd)
@@ -53,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	14%{?dist}
+Release:	15%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -60,14 +60,39 @@
 BuildRequires:  %{_host_rpmprefix}gcc
 
+%define build_sim --enable-sim
+%if "%{_build}" != "%{_host}"
+# psim doesn't support Cdn-X
+%if "arm-rtems4.8" == "powerpc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
+%ifos mingw mingw32
+# Mingw lacks functions required by the simulator
+%if "arm-rtems4.8" == "sparc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "arm-rtems4.8" == "h8300-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+%if "arm-rtems4.8" == "m32c-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+%if "arm-rtems4.8" == "lm32-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "arm-rtems4.8" == "mipstx39-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
 %if "%{gdb_version}" >= "6.6"
 # suse
-%if "%{?suse}"
 %if "%{?suse}" >= "10.3"
 BuildRequires: libexpat-devel
 %else
-BuildRequires: expat
-%endif
-%else
-# fedora/redhat/cygwin
+# Fedora/CentOS/Cygwin/MinGW
 BuildRequires: %{_host_rpmprefix}expat-devel
 %endif
@@ -92,5 +117,8 @@
 %{?_without_sources:NoSource:	0}
 %if "%{gdb_version}" == "6.6"
-Patch0:		gdb-6.6-rtems4.8-20071216.diff
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.6-rtems4.8-20090724.diff
+%endif
+%if "%{gdb_version}" == "6.8"
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.8-rtems4.8-20080429.diff
 %endif
 
@@ -124,5 +152,5 @@
     --disable-win32-registry \
     --disable-werror \
-    --enable-sim \
+    %{build_sim} \
 %if "%{gdb_version}" >= "6.7"
     --with-system-readline \
@@ -130,4 +158,7 @@
 %if "%{gdb_version}" >= "6.6"
     --with-expat \
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+    --without-python \
 %endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
Index: contrib/crossrpms/rtems4.8/h8300/rtems-4.8-h8300-rtems4.8-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.8/h8300/rtems-4.8-h8300-rtems4.8-gdb.spec	(revision cd8dd21b63fdd3d26b7dcd0bd9cdf4abffafe685)
+++ contrib/crossrpms/rtems4.8/h8300/rtems-4.8-h8300-rtems4.8-gdb.spec	(revision a3edc1b8d278e3a8f7c1f2afd230c272df46a4cd)
@@ -53,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	14%{?dist}
+Release:	15%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -60,14 +60,39 @@
 BuildRequires:  %{_host_rpmprefix}gcc
 
+%define build_sim --enable-sim
+%if "%{_build}" != "%{_host}"
+# psim doesn't support Cdn-X
+%if "h8300-rtems4.8" == "powerpc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
+%ifos mingw mingw32
+# Mingw lacks functions required by the simulator
+%if "h8300-rtems4.8" == "sparc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "h8300-rtems4.8" == "h8300-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+%if "h8300-rtems4.8" == "m32c-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+%if "h8300-rtems4.8" == "lm32-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "h8300-rtems4.8" == "mipstx39-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
 %if "%{gdb_version}" >= "6.6"
 # suse
-%if "%{?suse}"
 %if "%{?suse}" >= "10.3"
 BuildRequires: libexpat-devel
 %else
-BuildRequires: expat
-%endif
-%else
-# fedora/redhat/cygwin
+# Fedora/CentOS/Cygwin/MinGW
 BuildRequires: %{_host_rpmprefix}expat-devel
 %endif
@@ -92,5 +117,8 @@
 %{?_without_sources:NoSource:	0}
 %if "%{gdb_version}" == "6.6"
-Patch0:		gdb-6.6-rtems4.8-20071216.diff
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.6-rtems4.8-20090724.diff
+%endif
+%if "%{gdb_version}" == "6.8"
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.8-rtems4.8-20080429.diff
 %endif
 
@@ -124,5 +152,5 @@
     --disable-win32-registry \
     --disable-werror \
-    --enable-sim \
+    %{build_sim} \
 %if "%{gdb_version}" >= "6.7"
     --with-system-readline \
@@ -130,4 +158,7 @@
 %if "%{gdb_version}" >= "6.6"
     --with-expat \
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+    --without-python \
 %endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
Index: contrib/crossrpms/rtems4.8/i386/rtems-4.8-i386-rtems4.8-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.8/i386/rtems-4.8-i386-rtems4.8-gdb.spec	(revision cd8dd21b63fdd3d26b7dcd0bd9cdf4abffafe685)
+++ contrib/crossrpms/rtems4.8/i386/rtems-4.8-i386-rtems4.8-gdb.spec	(revision a3edc1b8d278e3a8f7c1f2afd230c272df46a4cd)
@@ -53,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	14%{?dist}
+Release:	15%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -60,14 +60,39 @@
 BuildRequires:  %{_host_rpmprefix}gcc
 
+%define build_sim --enable-sim
+%if "%{_build}" != "%{_host}"
+# psim doesn't support Cdn-X
+%if "i386-rtems4.8" == "powerpc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
+%ifos mingw mingw32
+# Mingw lacks functions required by the simulator
+%if "i386-rtems4.8" == "sparc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "i386-rtems4.8" == "h8300-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+%if "i386-rtems4.8" == "m32c-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+%if "i386-rtems4.8" == "lm32-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "i386-rtems4.8" == "mipstx39-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
 %if "%{gdb_version}" >= "6.6"
 # suse
-%if "%{?suse}"
 %if "%{?suse}" >= "10.3"
 BuildRequires: libexpat-devel
 %else
-BuildRequires: expat
-%endif
-%else
-# fedora/redhat/cygwin
+# Fedora/CentOS/Cygwin/MinGW
 BuildRequires: %{_host_rpmprefix}expat-devel
 %endif
@@ -92,5 +117,8 @@
 %{?_without_sources:NoSource:	0}
 %if "%{gdb_version}" == "6.6"
-Patch0:		gdb-6.6-rtems4.8-20071216.diff
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.6-rtems4.8-20090724.diff
+%endif
+%if "%{gdb_version}" == "6.8"
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.8-rtems4.8-20080429.diff
 %endif
 
@@ -124,5 +152,5 @@
     --disable-win32-registry \
     --disable-werror \
-    --enable-sim \
+    %{build_sim} \
 %if "%{gdb_version}" >= "6.7"
     --with-system-readline \
@@ -130,4 +158,7 @@
 %if "%{gdb_version}" >= "6.6"
     --with-expat \
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+    --without-python \
 %endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
Index: contrib/crossrpms/rtems4.8/m68k/rtems-4.8-m68k-rtems4.8-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.8/m68k/rtems-4.8-m68k-rtems4.8-gdb.spec	(revision cd8dd21b63fdd3d26b7dcd0bd9cdf4abffafe685)
+++ contrib/crossrpms/rtems4.8/m68k/rtems-4.8-m68k-rtems4.8-gdb.spec	(revision a3edc1b8d278e3a8f7c1f2afd230c272df46a4cd)
@@ -53,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	14%{?dist}
+Release:	15%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -60,14 +60,39 @@
 BuildRequires:  %{_host_rpmprefix}gcc
 
+%define build_sim --enable-sim
+%if "%{_build}" != "%{_host}"
+# psim doesn't support Cdn-X
+%if "m68k-rtems4.8" == "powerpc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
+%ifos mingw mingw32
+# Mingw lacks functions required by the simulator
+%if "m68k-rtems4.8" == "sparc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "m68k-rtems4.8" == "h8300-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+%if "m68k-rtems4.8" == "m32c-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+%if "m68k-rtems4.8" == "lm32-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "m68k-rtems4.8" == "mipstx39-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
 %if "%{gdb_version}" >= "6.6"
 # suse
-%if "%{?suse}"
 %if "%{?suse}" >= "10.3"
 BuildRequires: libexpat-devel
 %else
-BuildRequires: expat
-%endif
-%else
-# fedora/redhat/cygwin
+# Fedora/CentOS/Cygwin/MinGW
 BuildRequires: %{_host_rpmprefix}expat-devel
 %endif
@@ -92,5 +117,8 @@
 %{?_without_sources:NoSource:	0}
 %if "%{gdb_version}" == "6.6"
-Patch0:		gdb-6.6-rtems4.8-20071216.diff
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.6-rtems4.8-20090724.diff
+%endif
+%if "%{gdb_version}" == "6.8"
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.8-rtems4.8-20080429.diff
 %endif
 
@@ -124,5 +152,5 @@
     --disable-win32-registry \
     --disable-werror \
-    --enable-sim \
+    %{build_sim} \
 %if "%{gdb_version}" >= "6.7"
     --with-system-readline \
@@ -130,4 +158,7 @@
 %if "%{gdb_version}" >= "6.6"
     --with-expat \
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+    --without-python \
 %endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
Index: contrib/crossrpms/rtems4.8/mips/rtems-4.8-mips-rtems4.8-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.8/mips/rtems-4.8-mips-rtems4.8-gdb.spec	(revision cd8dd21b63fdd3d26b7dcd0bd9cdf4abffafe685)
+++ contrib/crossrpms/rtems4.8/mips/rtems-4.8-mips-rtems4.8-gdb.spec	(revision a3edc1b8d278e3a8f7c1f2afd230c272df46a4cd)
@@ -53,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	14%{?dist}
+Release:	15%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -60,14 +60,39 @@
 BuildRequires:  %{_host_rpmprefix}gcc
 
+%define build_sim --enable-sim
+%if "%{_build}" != "%{_host}"
+# psim doesn't support Cdn-X
+%if "mips-rtems4.8" == "powerpc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
+%ifos mingw mingw32
+# Mingw lacks functions required by the simulator
+%if "mips-rtems4.8" == "sparc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "mips-rtems4.8" == "h8300-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+%if "mips-rtems4.8" == "m32c-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+%if "mips-rtems4.8" == "lm32-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "mips-rtems4.8" == "mipstx39-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
 %if "%{gdb_version}" >= "6.6"
 # suse
-%if "%{?suse}"
 %if "%{?suse}" >= "10.3"
 BuildRequires: libexpat-devel
 %else
-BuildRequires: expat
-%endif
-%else
-# fedora/redhat/cygwin
+# Fedora/CentOS/Cygwin/MinGW
 BuildRequires: %{_host_rpmprefix}expat-devel
 %endif
@@ -92,5 +117,8 @@
 %{?_without_sources:NoSource:	0}
 %if "%{gdb_version}" == "6.6"
-Patch0:		gdb-6.6-rtems4.8-20071216.diff
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.6-rtems4.8-20090724.diff
+%endif
+%if "%{gdb_version}" == "6.8"
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.8-rtems4.8-20080429.diff
 %endif
 
@@ -124,5 +152,5 @@
     --disable-win32-registry \
     --disable-werror \
-    --enable-sim \
+    %{build_sim} \
 %if "%{gdb_version}" >= "6.7"
     --with-system-readline \
@@ -130,4 +158,7 @@
 %if "%{gdb_version}" >= "6.6"
     --with-expat \
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+    --without-python \
 %endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
Index: contrib/crossrpms/rtems4.8/mipstx39/rtems-4.8-mipstx39-rtems4.8-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.8/mipstx39/rtems-4.8-mipstx39-rtems4.8-gdb.spec	(revision cd8dd21b63fdd3d26b7dcd0bd9cdf4abffafe685)
+++ contrib/crossrpms/rtems4.8/mipstx39/rtems-4.8-mipstx39-rtems4.8-gdb.spec	(revision a3edc1b8d278e3a8f7c1f2afd230c272df46a4cd)
@@ -53,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	14%{?dist}
+Release:	15%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -60,14 +60,39 @@
 BuildRequires:  %{_host_rpmprefix}gcc
 
+%define build_sim --enable-sim
+%if "%{_build}" != "%{_host}"
+# psim doesn't support Cdn-X
+%if "mipstx39-rtems4.8" == "powerpc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
+%ifos mingw mingw32
+# Mingw lacks functions required by the simulator
+%if "mipstx39-rtems4.8" == "sparc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "mipstx39-rtems4.8" == "h8300-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+%if "mipstx39-rtems4.8" == "m32c-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+%if "mipstx39-rtems4.8" == "lm32-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "mipstx39-rtems4.8" == "mipstx39-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
 %if "%{gdb_version}" >= "6.6"
 # suse
-%if "%{?suse}"
 %if "%{?suse}" >= "10.3"
 BuildRequires: libexpat-devel
 %else
-BuildRequires: expat
-%endif
-%else
-# fedora/redhat/cygwin
+# Fedora/CentOS/Cygwin/MinGW
 BuildRequires: %{_host_rpmprefix}expat-devel
 %endif
@@ -92,5 +117,8 @@
 %{?_without_sources:NoSource:	0}
 %if "%{gdb_version}" == "6.6"
-Patch0:		gdb-6.6-rtems4.8-20071216.diff
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.6-rtems4.8-20090724.diff
+%endif
+%if "%{gdb_version}" == "6.8"
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.8-rtems4.8-20080429.diff
 %endif
 
@@ -124,5 +152,5 @@
     --disable-win32-registry \
     --disable-werror \
-    --enable-sim \
+    %{build_sim} \
 %if "%{gdb_version}" >= "6.7"
     --with-system-readline \
@@ -130,4 +158,7 @@
 %if "%{gdb_version}" >= "6.6"
     --with-expat \
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+    --without-python \
 %endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
Index: contrib/crossrpms/rtems4.8/powerpc/rtems-4.8-powerpc-rtems4.8-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.8/powerpc/rtems-4.8-powerpc-rtems4.8-gdb.spec	(revision cd8dd21b63fdd3d26b7dcd0bd9cdf4abffafe685)
+++ contrib/crossrpms/rtems4.8/powerpc/rtems-4.8-powerpc-rtems4.8-gdb.spec	(revision a3edc1b8d278e3a8f7c1f2afd230c272df46a4cd)
@@ -53,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	14%{?dist}
+Release:	15%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -60,14 +60,39 @@
 BuildRequires:  %{_host_rpmprefix}gcc
 
+%define build_sim --enable-sim
+%if "%{_build}" != "%{_host}"
+# psim doesn't support Cdn-X
+%if "powerpc-rtems4.8" == "powerpc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
+%ifos mingw mingw32
+# Mingw lacks functions required by the simulator
+%if "powerpc-rtems4.8" == "sparc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "powerpc-rtems4.8" == "h8300-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+%if "powerpc-rtems4.8" == "m32c-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+%if "powerpc-rtems4.8" == "lm32-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "powerpc-rtems4.8" == "mipstx39-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
 %if "%{gdb_version}" >= "6.6"
 # suse
-%if "%{?suse}"
 %if "%{?suse}" >= "10.3"
 BuildRequires: libexpat-devel
 %else
-BuildRequires: expat
-%endif
-%else
-# fedora/redhat/cygwin
+# Fedora/CentOS/Cygwin/MinGW
 BuildRequires: %{_host_rpmprefix}expat-devel
 %endif
@@ -92,5 +117,8 @@
 %{?_without_sources:NoSource:	0}
 %if "%{gdb_version}" == "6.6"
-Patch0:		gdb-6.6-rtems4.8-20071216.diff
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.6-rtems4.8-20090724.diff
+%endif
+%if "%{gdb_version}" == "6.8"
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.8-rtems4.8-20080429.diff
 %endif
 
@@ -124,5 +152,5 @@
     --disable-win32-registry \
     --disable-werror \
-    --enable-sim \
+    %{build_sim} \
 %if "%{gdb_version}" >= "6.7"
     --with-system-readline \
@@ -130,4 +158,7 @@
 %if "%{gdb_version}" >= "6.6"
     --with-expat \
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+    --without-python \
 %endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
Index: contrib/crossrpms/rtems4.8/sh/rtems-4.8-sh-rtems4.8-gdb.spec
===================================================================
--- contrib/crossrpms/rtems4.8/sh/rtems-4.8-sh-rtems4.8-gdb.spec	(revision cd8dd21b63fdd3d26b7dcd0bd9cdf4abffafe685)
+++ contrib/crossrpms/rtems4.8/sh/rtems-4.8-sh-rtems4.8-gdb.spec	(revision a3edc1b8d278e3a8f7c1f2afd230c272df46a4cd)
@@ -53,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	14%{?dist}
+Release:	15%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
@@ -60,14 +60,39 @@
 BuildRequires:  %{_host_rpmprefix}gcc
 
+%define build_sim --enable-sim
+%if "%{_build}" != "%{_host}"
+# psim doesn't support Cdn-X
+%if "sh-rtems4.8" == "powerpc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
+%ifos mingw mingw32
+# Mingw lacks functions required by the simulator
+%if "sh-rtems4.8" == "sparc-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "sh-rtems4.8" == "h8300-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+%if "sh-rtems4.8" == "m32c-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+%if "sh-rtems4.8" == "lm32-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%if "sh-rtems4.8" == "mipstx39-rtems4.8"
+%define build_sim --disable-sim
+%endif
+%endif
+
 %if "%{gdb_version}" >= "6.6"
 # suse
-%if "%{?suse}"
 %if "%{?suse}" >= "10.3"
 BuildRequires: libexpat-devel
 %else
-BuildRequires: expat
-%endif
-%else
-# fedora/redhat/cygwin
+# Fedora/CentOS/Cygwin/MinGW
 BuildRequires: %{_host_rpmprefix}expat-devel
 %endif
@@ -92,5 +117,8 @@
 %{?_without_sources:NoSource:	0}
 %if "%{gdb_version}" == "6.6"
-Patch0:		gdb-6.6-rtems4.8-20071216.diff
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.6-rtems4.8-20090724.diff
+%endif
+%if "%{gdb_version}" == "6.8"
+Patch0:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.8/gdb-6.8-rtems4.8-20080429.diff
 %endif
 
@@ -124,5 +152,5 @@
     --disable-win32-registry \
     --disable-werror \
-    --enable-sim \
+    %{build_sim} \
 %if "%{gdb_version}" >= "6.7"
     --with-system-readline \
@@ -130,4 +158,7 @@
 %if "%{gdb_version}" >= "6.6"
     --with-expat \
+%endif
+%if "%{gdb_version}" >= "6.8.50"
+    --without-python \
 %endif
     --prefix=%{_prefix} --bindir=%{_bindir} \
