--- /dev/null
+--- gdb.spec.orig 2007-04-28 23:50:42.000000000 +0200
++++ gdb.spec 2007-04-29 00:38:09.000000000 +0200
+@@ -519,7 +519,8 @@
+ # at least one warning, and stop the compilation. The whole configury
+ # line needs to be cleaned up.
+
+-export CFLAGS="$RPM_OPT_FLAGS"
++#export CFLAGS="$RPM_OPT_FLAGS"
++export CFLAGS="$RPM_OPT_FLAGS -O0 -ggdb2"
+
+ enable_build_warnings="--enable-gdb-build-warnings=,-Wno-unused"
+ %ifarch %{ix86} alpha ia64 ppc s390 s390x x86_64 ppc64
+@@ -539,6 +540,7 @@
+ %else
+ --without-libunwind \
+ %endif
++ --enable-static --disable-shared --enable-debug \
+ %{_target_platform}
+
+ make %{?_smp_mflags}