buildgcc: Print error if flex is missing

flex is needed by acpica. This patch makes the build fail early
instead of after gcc has been compiled, if flex is not there.

Change-Id: Idfd71bdf704ab25de655f1a72c266c5220b15048
Signed-off-by: Stefan Reinauer <>
Reviewed-by: Idwer Vollering <>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <>
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index f17ec89..91ec1cf 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -119,6 +119,7 @@
 searchgnu m4 > /dev/null
 searchgnu bison > /dev/null
+searchgnu flex > /dev/null