Index: Makefile.def
===================================================================
--- Makefile.def	(revision 217944)
+++ Makefile.def	(working copy)
@@ -48,7 +48,8 @@
 host_modules= { module= gcc; bootstrap=true; 
 		extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
 host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
-		extra_configure_flags='--disable-shared';
+		// Work around in-tree gmp configure bug with missing flex.
+		extra_configure_flags='--disable-shared LEX="touch lex.yy.c"';
 		no_install= true;
 		// none-*-* disables asm optimizations, bootstrap-testing
 		// the compiler more thoroughly.
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 217944)
+++ Makefile.in	(working copy)
@@ -10986,7 +10986,7 @@
 	  $$s/$$module_srcdir/configure \
 	  --srcdir=$${topdir}/$$module_srcdir \
 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
-	  --target=none-${host_vendor}-${host_os} --disable-shared \
+	  --target=none-${host_vendor}-${host_os} --disable-shared LEX="touch lex.yy.c" \
 	  || exit 1
 @endif gmp
 
@@ -11022,7 +11022,7 @@
 	  --target=none-${host_vendor}-${host_os} \
 	   \
 	  $(STAGE1_CONFIGURE_FLAGS) \
-	  --disable-shared
+	  --disable-shared LEX="touch lex.yy.c"
 @endif gmp-bootstrap
 
 .PHONY: configure-stage2-gmp maybe-configure-stage2-gmp
@@ -11056,7 +11056,7 @@
 	  --target=none-${host_vendor}-${host_os} \
 	   --with-build-libsubdir=$(HOST_SUBDIR)  \
 	  $(STAGE2_CONFIGURE_FLAGS) \
-	  --disable-shared
+	  --disable-shared LEX="touch lex.yy.c"
 @endif gmp-bootstrap
 
 .PHONY: configure-stage3-gmp maybe-configure-stage3-gmp
@@ -11090,7 +11090,7 @@
 	  --target=none-${host_vendor}-${host_os} \
 	   --with-build-libsubdir=$(HOST_SUBDIR)  \
 	  $(STAGE3_CONFIGURE_FLAGS) \
-	  --disable-shared
+	  --disable-shared LEX="touch lex.yy.c"
 @endif gmp-bootstrap
 
 .PHONY: configure-stage4-gmp maybe-configure-stage4-gmp
@@ -11124,7 +11124,7 @@
 	  --target=none-${host_vendor}-${host_os} \
 	   --with-build-libsubdir=$(HOST_SUBDIR)  \
 	  $(STAGE4_CONFIGURE_FLAGS) \
-	  --disable-shared
+	  --disable-shared LEX="touch lex.yy.c"
 @endif gmp-bootstrap
 
 .PHONY: configure-stageprofile-gmp maybe-configure-stageprofile-gmp
@@ -11158,7 +11158,7 @@
 	  --target=none-${host_vendor}-${host_os} \
 	   --with-build-libsubdir=$(HOST_SUBDIR)  \
 	  $(STAGEprofile_CONFIGURE_FLAGS) \
-	  --disable-shared
+	  --disable-shared LEX="touch lex.yy.c"
 @endif gmp-bootstrap
 
 .PHONY: configure-stagefeedback-gmp maybe-configure-stagefeedback-gmp
@@ -11192,7 +11192,7 @@
 	  --target=none-${host_vendor}-${host_os} \
 	   --with-build-libsubdir=$(HOST_SUBDIR)  \
 	  $(STAGEfeedback_CONFIGURE_FLAGS) \
-	  --disable-shared
+	  --disable-shared LEX="touch lex.yy.c"
 @endif gmp-bootstrap
 
 
