Re: configure oddity

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: configure oddity

Ralf Wildenhues
[ ]

* Ralf Wildenhues wrote on Mon, Feb 28, 2011 at 07:38:50AM CET:
> This patch doesn't change at all the semantics of whether you need to
> run autoconf or not.  Only when you run it, no matter whether triggered
> by make or run manually, it diagnoses buggy m4 versions.

Nobody complained about the patch, so I'm committing it to GCC and
syncing to src, with recommendations updated.  If you get a runtime
failure from m4 when running any of autoconf, aclocal, or automake, in
the GCC or src trees, then that means you have a buggy m4 and should
update to a fixed version.

I am specifically _not_ testing for the other bug Eric found (see
because we don't yet have evidence that the bug causes differing output
in practice, and I'm guessing that m4 versions with that particular bug
are so widespread that it would upset people to see their
--enable-maintainer-mode builds fail due to the check.


2011-03-05  Ralf Wildenhues  <[hidden email]>
            Eric Blake  <[hidden email]>

        * override.m4: Error out if a buggy M4 was detected, to
        avoid spurious diffs in generated files.

diff --git a/config/override.m4 b/config/override.m4
index fc2d527..52bd1c3 100644
--- a/config/override.m4
+++ b/config/override.m4
@@ -48,6 +48,12 @@ _GCC_AUTOCONF_VERSION_CHECK
+dnl Ensure we do not use a buggy M4.
+m4_if(m4_index([..wi.d.], [.d.]), [-1],
+  [m4_fatal(m4_do([m4 with buggy strstr detected.  Please install
+GNU M4 1.4.16 or newer and set the M4 environment variable]))])
 dnl Fix 2.64 cross compile detection for AVR and RTEMS
 dnl by not trying to compile fopen.
 m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.64],