rust/mk
bors 44808fcee6 auto merge of #7820 : pnkfelix/rust/fill-in-some-missing-rustc-lib-dependences, r=graydon
r? anyone

Fix #8057

This commit fixes some oversights in the Makefile where rustc could be
invoked without some of its dependencies yet in place.  (I encountered
the problem in practice; its not just theoretical.)

As written in Makefile.in, $(STAGE$(1)_T_$(2)_H_$(3)) is the way one
writes an invocation of rustc where $(1) is the stage number $(2) is
the target triple $(3) is the host triple.  (Other uses of the macro
may plug in actual values or different parameters in for those three
formal parameters.)

When you have invocations of $(STAGE...), you need to make sure that
its dependences are satisfied; otherwise, if someone is using `make
-jN` for certain (large-ish) `N`, one can encounter situations where
GNU make attempts to invoke `rustc` before it has actually copied some
of its libraries into place, such as libmorestack.a, which causes a
link failure when the rustc invocation attempts to link in those
libraries.

In this case, the main prerequisite to add is TSREQ$(1)_T_$(2)_H_$(3),
which is described in Makefile.in as "Prerequisites for using the
stageN compiler to build target artifacts"

----

In addition to adding the extra dependences on TSREQ..., I also
replaced occurrences of the pattern:

    TSREQ$(1)_T_$(2)_H_$(3)
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))

with:

    SREQ$(1)_T_$(2)_H_$(3)

which is equivalent to the above, as defined in Makefile.in

----

Finally, for the cases where TSREQ was missing in tests.mk, I went
ahead and put in a dependence on SREQ rather than just TSREQ, since it
was not clear to me how one could expect to compile those cases
without stdlib and extralib.

(It could well be that I should have gone ahead and done the same in
 other cases where I saw TSREQ was missing, and put SREQ in those
 cases as well.  But this seemed like a good measure for now, without
 needing to tax my understanding of the overall makefile
 infrastructure much further.)
2013-07-26 11:34:46 -07:00
..
clean.mk mk: clean-llvm for cross-compile 2013-06-30 12:54:17 +09:00
ctags.mk
dist.mk Add CONTRIBUTING.md and RELEASES.txt to release tarball. Closes #7561. 2013-07-13 16:57:01 +03:00
docs.mk Add project information to l10n templates. 2013-07-17 07:48:30 +09:00
host.mk Fix #3225: Incorporate feedback from Graydon. 2013-07-09 13:08:50 +02:00
install.mk auto merge of #7796 : thomaslee/rust/issue-6247, r=z0w0 2013-07-14 23:40:19 -07:00
llvm.mk mk: Split target triples into bulid triple + host triples + target triples 2013-02-21 17:51:55 -08:00
perf.mk mk: cleanup - lib and executable suffix handling 2013-03-02 21:25:12 +09:00
platform.mk Add x64 windows to platform.mk and mingw64 header fixes. 2013-07-03 23:33:59 -04:00
pp.mk Remove the fuzzer 2013-06-15 16:12:56 -07:00
rt.mk Turn off jemalloc 2013-06-18 12:03:14 -07:00
rustllvm.mk Refactor optimization pass handling. 2013-05-29 14:16:49 +12:00
snap.mk mk: Remove CFG_INSTALL_SNAP logic. #2664 2013-07-19 15:35:42 -07:00
stage0.mk Fix #3225: Incorporate feedback from Graydon. 2013-07-09 13:08:50 +02:00
target.mk auto merge of #7820 : pnkfelix/rust/fill-in-some-missing-rustc-lib-dependences, r=graydon 2013-07-26 11:34:46 -07:00
tests.mk auto merge of #7820 : pnkfelix/rust/fill-in-some-missing-rustc-lib-dependences, r=graydon 2013-07-26 11:34:46 -07:00
tools.mk Add dependence arc from running rustc to its libraries. 2013-07-16 13:45:30 +02:00