rust-osdev / cargo-xbuild

Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc.
Apache License 2.0
256 stars 25 forks source link

relocation R_X86_64_32S out of range #99

Open polyproline opened 3 years ago

polyproline commented 3 years ago

When I build a Kernel Os with some crates ,it happend. Then I tried to give RUSTFLAGS and rebuilded those crates, also failed. But when I used .cargo/config.toml ,set build-std and env RUSTFLAGS then it did well Is cargo-xbuild question or have another resolution I don`t find?

phil-opp commented 3 years ago

We don't pass RUSTFLAGS when building core and the other sysroot crates because we need to set our own RUSTFLAGS. If your project works with cargo's build-std feature, I recommend using that instead of cargo-xbuild.