On 01/27/14 18:20, Hans-Peter Nilsson wrote:
You'd need some additional conditions.  There might be the
additional issue that any "lex" is expected to work too, not
just "flex".

It isn't committed 'cuz nobody said, "Okay."
I do wish either someone would say, "Okay." or come up with something
that works.
I went to the effort to figure out where things got off the rails and
did something that
worked for me.  Just saying, "That won't work" without a workable alternative
is a bit irritating.

There are surely plenty of opportunities around for
irritatation! :)  Dropped patches surely; I thought I was
helpful there.  Ungraceful errors from easily identifiable
common gotchas definitely, so what you're trying to achieve is
IMHO desirable.  Patches hacking in something that just happened
to work for someone too; I tried to stop that from happening.

I spend my programming life either hacking at a startup or maintaining
a few GNU tools I'm responsible for (e.g. "fixincludes").  This is
outside of that realm, so I'm trying to produce enough of a patch
that someone who knows how better than I do can finish it.

I put my patch into the top level configure.ac file, not the
gcc or libcpp ones.  I suppose I could hack out the logic for
setting is_release from those files, but really the crucial part
is just having an intelligible error message that leads someone
with a removed "flex" tool to a resolution of the issue.
Someday maybe important tools won't disappear on you when
you update your distribution, but barring that, the silent
requirement for flex combined with an uninformative error
message yields a booby trap.  I hate booby traps.    :)

Cheers - Bruce



$ svn diff configure.ac
Index: configure.ac
===================================================================
--- configure.ac        (revision 208044)
+++ configure.ac        (working copy)
@@ -1319,10 +1319,17 @@
 # Used for setting $lt_cv_objdir
 _LT_CHECK_OBJDIR

-# Check for GMP, MPFR and MPC
+# Check for flex, GMP, MPFR and MPC
+[for p in flex
+do
+  c=`command -v $p`
+  test -x "$c" || \
+    ]AC_MSG_ERROR([the $c command is required to build GCC])[
+done
+
 gmplibs="-lmpc -lmpfr -lgmp"
 gmpinc=
-have_gmp=no
+have_gmp=no]

 # Specify a location for mpc
 # check for this first so it ends up on the link line before mpfr.

Reply via email to