Interesting Makefile race condition ...
Ulrich Weigand
Ulrich.Weigand@de.ibm.com
Thu Jun 13 13:15:00 GMT 2002
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
More information about the Gcc
mailing list