4
votes

When I compile rustc, there is a option in the configure script to specify other targets to the core libraries (libcore, libstd, etc), so for example:

./configure --target=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu

will compile and install the rustlibs for both these architectures.

My problem is that this command will use my default gcc to compile everything, (since my system is multilib, it will successfully compile to i686 too), but what I want is to use my toolchain compiler instead, so for example:

I have 2 toolchains in my amd64 system: i686-unknown-linux-gnu and arm-unknown-linux-gnueabi.

When I run configure with these parameters:

./configure --target=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu,arm-unknown-linux-gnueabi

When compiling the rustlibs, I want the script to use x86_64-unknown-linux-gnu-gcc for x86_64, and i686-unknown-linux-gnu-gcc for i686 and arm-unknown-linux-gnueabi-gcc for arm.

That way the rustlib will be compiled using the glibc and other libraries from the toolchain and not the default from my system. Is that possible?

1

1 Answers

0
votes

It's specified using suffixed environment variables: see here for what they do in CI.