Closed
Description
There doesn't seem to be a way to specify custom C and C++ compiler in configuration.
As a bonus, if this is done then the --enable-clang
and --enable-ccache
flags can be thrown away.
Context: I need this capability because my system build of GCC is only at 4.6 (I'm using one of those really old long term support distributions) and I want to specify my custom build of GCC 4.9 so I can build the version of LLVM packaged with Rust. Yes, I could hack around this but it's simplest if Rust gains options to override the compilers.
Metadata
Metadata
Assignees
Labels
No labels
Activity
pnkfelix commentedon Apr 27, 2014
I thought if you have the
CC
andCXX
environment variables set, it will use those compilers. I haven't checked closely recently; is the problem that we only support those environment variables duringmake
itself, and not during the execution of theconfigure
script?Anyway, we should try to make sure that some functionality of this sort works. (Though I don't think it would be a release blocker.)
Also, I am not sure we would be able to remove
--enable-ccache
if we fixed this issue. In particular we have at least oneccache
specific hack to avoid spurious warnings fromclang
on accache-miss
; you can review some of those details by looking at PR #6805.alexcrichton commentedon Apr 27, 2014
You can also modify your
PATH
to point to the relevant compiler. The linux snapshot bots have a system gcc of 4.6 and I installed a 4.7 toolchain on them in a nonstandard location, and they're all building with the 4.7 toolchain.A sample of the
./configure
output: http://buildbot.rust-lang.org/builders/nightly-linux/builds/53/steps/configure/logs/stdiomstewartgallus commentedon Apr 27, 2014
@pnkfelix, yes the
CC
andCXX
environment variables don't work for configuring. I did not know about the reason for the --enable-ccache option, thanks.@alexcrichton, Okay I'll use the
PATH
workaround for now (although that means one has to specify thePATH
while doing themake
as well).pnkfelix commentedon Apr 28, 2014
okay, so maybe one easy way to satisfy this would be to make the
configure
script respect theCC
andCXX
environment variables, if set.CC
,CXX
,CFLAGS
etc. #13823auto merge of #13823 : pnkfelix/rust/fsk-fix-13805, r=alexcrichton
3 remaining items