Skip to content

Bootstrap configuration --host= option not enough on its own #33908

Closed
@MagaTailor

Description

@MagaTailor

It was already brought to @alexcrichton's attention two months ago, and again yesterday, the --build flag was needed to set the LLVM runtime during cross-bootstrap, i.e. determine the actually desired host compiler.

For some reason he keeps repeating the same advice, so it's time to open an issue about it.

Lets's illustrate the problem on ARM, that is an arm-linux-gnueabihf host, which normally picks arm-unknown-linux-gnueabihf as the build configuration, trying to bootstrap the armv7 version:

Following @alexcrichton's suggestion:
./configure --host=armv7-unknown-linux-gnueabihf

we get the following:

CFG_BUILD            := arm-unknown-linux-gnueabihf
CFG_HOST             := arm-unknown-linux-gnueabihf armv7-etc
CFG_TARGET           := arm-unknown-linux-gnueabihf armv7-etc

that is, compiler runtime was picked up from the actual host detection, whereas the armv7 part is added as a second crate-set. To actually get the host compiler we want in a single switch, the following is necessary:
./configure --build=armv7-unknown-linux-gnueabihf

This doesn't look completely illogical (or it would have been noticed a long time ago) cause we have two separate build systems (rust and llvm), and unlike gcc, llvm can emit code for every supported architecture by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions