BUILD_CFLAGS must be passed along to igen (which gets built when
building for mips). This is fixed in mainline gdb.
---
gdb-7.6.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gdb-7.6.patch b/gdb-7.6.patch
index da6f09b..5e5eba1 100644
--- a/gdb-7.6.patch
+++ b/gdb-7.6.patch
@@ -1688,3 +1688,16 @@
#include <sys/utsname.h>
#include "gregset.h"
+diff --git a/sim/igen/Makefile.in b/sim/igen/Makefile.in
+index 7b2375c..8f6a42c 100644
+--- gdb-7.6/sim/igen/Makefile.in.orig
++++ gdb-7.6/sim/igen/Makefile.in
+@@ -117,7 +117,7 @@ IGEN_OBJS=\
+ gen.o
+
+ igen: igen.o $(IGEN_OBJS)
+- $(CC_FOR_BUILD) $(BUILD_LDFLAGS) -o igen igen.o $(IGEN_OBJS) $(LIBIBERTY_LIB)
++ $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o igen igen.o $(IGEN_OBJS)
$(LIBIBERTY_LIB)
+
+ igen.o: igen.c misc.h filter_host.h lf.h table.h ld-decode.h ld-cache.h ld-insn.h
filter.h gen-model.h gen-itable.h gen-icache.h gen-idecode.h gen-engine.h gen-semantics.h
gen-support.h gen.h igen.h
+ $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
--
2.1.4