diff options
| author | bors <bors@rust-lang.org> | 2014-04-21 16:06:32 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-21 16:06:32 -0700 |
| commit | 4401f88688eec9052f292ce3b3b8cb96da2853f2 (patch) | |
| tree | f66b58541ac82dccde60f2bfbec9fbdd9d126971 | |
| parent | 829c00cb09ac093307a6edc5bbca92c4ad9dbda2 (diff) | |
| parent | 80bd17643234239ea556e25a8ff56c2164eb6313 (diff) | |
| download | rust-4401f88688eec9052f292ce3b3b8cb96da2853f2.tar.gz rust-4401f88688eec9052f292ce3b3b8cb96da2853f2.zip | |
auto merge of #13631 : alexcrichton/rust/fix-mk-cross, r=brson
Instead of passing through CC which may have things like ccache and other arguments (when using clang) this commit filters out the necessary arguments from CC to pass the right linker to rustc. Closes #13562
| -rw-r--r-- | mk/platform.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mk/platform.mk b/mk/platform.mk index cf6178ec5b0..56864f585f2 100644 --- a/mk/platform.mk +++ b/mk/platform.mk @@ -542,6 +542,8 @@ ifdef CFG_CCACHE_BASEDIR export CCACHE_BASEDIR endif +FIND_COMPILER = $(word 1,$(1:ccache=)) + define CFG_MAKE_TOOLCHAIN # Prepend the tools with their prefix if cross compiling ifneq ($(CFG_BUILD),$(1)) @@ -549,7 +551,8 @@ define CFG_MAKE_TOOLCHAIN CXX_$(1)=$(CROSS_PREFIX_$(1))$(CXX_$(1)) CPP_$(1)=$(CROSS_PREFIX_$(1))$(CPP_$(1)) AR_$(1)=$(CROSS_PREFIX_$(1))$(AR_$(1)) - RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(CXX_$(1)) -C ar=$$(AR_$(1)) $(RUSTC_CROSS_FLAGS_$(1)) + RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(call FIND_COMPILER,$$(CXX_$(1))) \ + -C ar=$$(call FIND_COMPILER,$$(AR_$(1))) $(RUSTC_CROSS_FLAGS_$(1)) RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1)) endif |
