This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Interesting Makefile race condition ...


Hello,

I've just noticed some weird behaviour probably caused by a Makefile
race condition:  I'd been experimenting with enabling multilibs on
s390, but simply doing a 'make -j6' would not build the multilibs.
However, after subsequently removing the stmp-multilib marker and
running make again, they suddenly *were* built.

What had apparently happened is that the rule building the libgcc.mk
file depends on '$(GCC_FOR_TARGET) --print-multi-lib' doing the right
thing.  However, when running a parallel make, it can happen that
this command is being run *before* the new specs file is created.
This means that the newly build xgcc will look in the *install* directory
for a specs file, and if it finds one there from a previous installation,
it will use that one!  This of course still contains old settings ...

How should this be fixed?  Maybe any Makefile target using
$(GCC_FOR_TARGET) should depend on specs as well as on xgcc?


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]