This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
don't run bison and flex for the host on the build machine
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 02 May 2004 04:48:02 -0300
- Subject: don't run bison and flex for the host on the build machine
- Organization: Red Hat Global Engineering Services Compiler Team
While attempting to cross-build a native toolchain, I ran into this
problem, fixed with the patch below. I'm checking it in as obvious.
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* configure.ac (FLEX, BISON): Only use tools from the build tree
if build equals host.
* configure: Rebuilt.
Index: gcc/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.34
diff -u -p -r2.34 configure.ac
--- gcc/configure.ac 30 Apr 2004 18:50:27 -0000 2.34
+++ gcc/configure.ac 2 May 2004 07:44:50 -0000
@@ -760,7 +760,7 @@ fi
# How about lex?
dnl Don't use AC_PROG_LEX; we insist on flex.
dnl LEXLIB is not useful in gcc.
-if test -f $srcdir/../flex/skel.c; then
+if test x${build} = x${host} && test -f $srcdir/../flex/skel.c; then
FLEX='$(objdir)/../flex/flex'
else
AC_CHECK_PROG(FLEX, flex, flex, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex)
@@ -768,7 +768,7 @@ fi
# Bison?
# The -L switch is so bison can find its skeleton file.
-if test -f $srcdir/../bison/bison.simple; then
+if test x${build} = x${host} && test -f $srcdir/../bison/bison.simple; then
BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/'
else
AC_CHECK_PROG(BISON, bison, bison, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison)
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}