Hi,

I am facing some challenge with lang/rust and clang compiler.

After several tests, it seems that it will be required that the compiler
used to built rustc to be used at runtime for linking Rust programs too
(like cargo).

Currently, rustc assumes gcc compiler (explicit link with libgcc for
example). But it could be easily switched to be built with base clang
compiler, and linking it with libc++ and libc++abi (I have only few
regresses tests failing, mostly due to false assumption on compiler
used).

For rustc itself, the requirement is the compiler to be able to do c++11
(so g++-4.9 or clang++), in order to build rust_llvm binding part.

The switch from gcc-4.9 to base clang would require a new rustc
bootstrap.

Does the port framework currently supports choice of base compiler ?

Please note I speak about *base* clang. The current port for clang is
currently built against libestdc++, which requires gcc-4.9.

As first step, I think I should send a diff to make Rust programs (cargo
and ripgrep) to use gcc4 MODULE. It would solve the current issue of
building cargo using clang (as the port will be built with gcc-4.9
instead).

lang/rust should also be configured to link Rust programs using "egcc"
instead of "cc".

Does it seems to right direction ?

Thanks.
-- 
Sebastien Marie

Reply via email to