This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Interesting Makefile race condition ...
- From: "Ulrich Weigand" <Ulrich dot Weigand at de dot ibm dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 13 Jun 2002 22:06:30 +0200
- Subject: Interesting Makefile race condition ...
- Sensitivity:
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