[trunk,google/gcc47] Add dependence of configure-target-libmudflap on configure-target-libstdc++-v3 (issue7740043)

Message ID CAJ_rGWSR86co5SDr3DaMzpdGrKYXNo58atsrv+V2Oq4m11yu6Q@mail.gmail.com
State New
Headers show

Commit Message

Jing Yu March 12, 2013, 12:21 a.m.
Don't know why the email body became attachment. Sent it again.
The review link is https://codereview.appspot.com/7740043

Hi Diego,

The nightly build of gcc-4.7 based ppc64 and ppc32 crosstools have failed since
the build server upgraded to gPrecise one week ago. Log shows a configuration fa
ilure on libmudflap.

checking for suffix of object files... /lib/cpp
configure: error: in
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

There is no /lib/cpp on gprecise server, though it should not be used here.

What happened was that libmudflap configure looks for a preprocessor
by trying $CXX -E and then backing off to /lib/cpp.  $CXX -E is
failing with "unrecognized command line option
‘-funconfigured-libstdc++’", and the /lib/cpp backstop then fails
also. The -funconfigured-libstdc++ is because configure can't find
libstdc++/scripts/testsuite_flags. This is a so-far undiagnosed race
in gcc make, masked where /lib/cpp is available.   And that's absent
because in this build, for whatever reason, libstdc++ loses a race
with libmudflap.

The theory is confirmed by:
 1) if we force --job=1, build can succeed
 2) If we apply the following patch to build-gcc/Makefile, build can
succeed. After removing this dependency, build fails with the same
error again.

Is this patch ok for google/gcc-4_7?

If the same issue exists on upstream trunk, how does the patch sound to trunk?


2013-03-11  Jing Yu  <jingyu@google.com>

        * Makefile.in: (maybe-configure-target-libmudflap):
        Add dependence on configure-target-libstdc++-v3.


Index: Makefile.in
--- Makefile.in (revision 196604)
+++ Makefile.in (working copy)
@@ -31879,6 +31879,9 @@  maybe-configure-target-libmudflap:
 @if gcc-bootstrap
 configure-target-libmudflap: stage_current
 @endif gcc-bootstrap
+@if target-libstdc++-v3
+configure-target-libmudflap: configure-target-libstdc++-v3
+@endif target-libstdc++-v3
 @if target-libmudflap
 maybe-configure-target-libmudflap: configure-target-libmudflap