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 | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gdb-7.6.patch b/gdb-7.6.patch
index da6f09b..ab7c037 100644
--- a/gdb-7.6.patch
+++ b/gdb-7.6.patch
@@ -1688,3 +1688,14 @@
#include <sys/utsname.h>
#include "gregset.h"
+--- 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