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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/arm/rtems-4.9-arm-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/avr/rtems-4.9-avr-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/bfin/rtems-4.9-bfin-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/i386/rtems-4.9-i386-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/m68k/rtems-4.9-m68k-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/mips/rtems-4.9-mips-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/mipstx39/rtems-4.9-mipstx39-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/powerpc/rtems-4.9-powerpc-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/sh/rtems-4.9-sh-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
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 4196eb67d8e02a834ca7ebfe94764a2268589ca6)
+++ contrib/crossrpms/rtems4.9/sparc/rtems-4.9-sparc-rtems4.9-gdb.spec	(revision 7ad3289ab900f7c8878c766bac537a2934d1078a)
@@ -4,10 +4,24 @@
 #
 
-%define _prefix			/opt/rtems-4.9
-%define _infodir		%{_prefix}/info
-%define _mandir			%{_prefix}/man
+%define _prefix                 /opt/rtems-4.9
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
 
 %ifos cygwin cygwin32 mingw mingw32
 %define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
 %else
 %define _exeext %{nil}
@@ -16,6 +30,12 @@
 %ifos cygwin cygwin32
 %define optflags -O3 -pipe -march=i486 -funroll-loops
-%define _libdir			%{_exec_prefix}/lib
-%define debug_package		%{nil}
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
 %endif
 
@@ -33,5 +53,5 @@
 Group:		Development/Tools
 Version:	%{gdb_rpmvers}
-Release:	4%{?dist}
+Release:	5%{?dist}
 License:	GPL/LGPL
 URL: 		http://sources.redhat.com/gdb
