Как скомпилировать rustc для 32-разрядного процессора PowerPC с прямым порядком байтов? - PullRequest
1 голос
/ 03 июля 2019

Я пытаюсь скомпилировать rustc для процессорного процессора e5500 FreeScale, который является 32-разрядным и имеет порядок байтов.Я следую инструкциям ржавчины .

Я пробовал два способа:

powerpc-unknown-linux-gnu для младшего байта

Я получаю сообщение об ошибке, так как не могу определить порядок байтов:

cargo:warning=In file included from ./compiler-rt/lib/builtins/int_types.h:21,
cargo:warning=                 from ./compiler-rt/lib/builtins/int_lib.h:75,
cargo:warning=                 from ./compiler-rt/lib/builtins/absvdi2.c:15:
cargo:warning=./compiler-rt/lib/builtins/int_endianness.h:113:2: error: #error Unable to determine endian
exit code: 1

--- stderr
thread 'main' panicked at '

Internal error occurred: Command "powerpc-linux-gnu-gcc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-fno-builtin" "-fvisibility=hidden" "-ffreestanding" "-fomit-frame-pointer" "-DVISIBILITY_HIDDEN" "-o" "/home/ykoehler/rust-build-powerpc-fsl-linux/build/x86_64-unknown-linux-gnu/stage2-std/powerpc-unknown-linux-gnu/release/build/compiler_builtins-05a438b00e7bb558/out/./compiler-rt/lib/builtins/absvdi2.o" "-c" "./compiler-rt/lib/builtins/absvdi2.c" with args "powerpc-linux-gnu-gcc" did not execute successfully (status code exit code: 1).

', /home/ykoehler/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.28/src/lib.rs:2314:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/home/ykoehler/rust-build-powerpc-fsl-linux/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "powerpc-unknown-linux-gnu" "-j" "4" "--release" "--features" "panic-unwind backtrace" "--manifest-path" "/home/ykoehler/rust/src/libstd/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101
failed to run: /home/ykoehler/rust-build-powerpc-fsl-linux/build/bootstrap/debug/bootstrap build
Build completed unsuccessfully in 0:00:39
make: *** [Makefile:18: all] Error 1

powerpc64le-unknown-linux-gnu для 32 бит

Я установил -m32 в config.toml внутри cflags.Я получаю сообщение об ошибке, так как мой компилятор не поддерживает -m64:

CC_powerpc64le-unknown-linux-gnu = Some("powerpc64le-linux-gnu-gcc")
CFLAGS_powerpc64le-unknown-linux-gnu = Some("-ffunction-sections -fdata-sections -fPIC -m64")
running: "powerpc64le-linux-gnu-gcc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-m64" "-fno-builtin" "-fvisibility=hidden" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-o" "/home/ykoehler/rust-build-powerpc-fsl-linux/build/x86_64-unknown-linux-gnu/stage2-std/powerpc64le-unknown-linux-gnu/release/build/compiler_builtins-05a438b00e7bb558/out/./compiler-rt/lib/builtins/absvdi2.o" "-c" "./compiler-rt/lib/builtins/absvdi2.c"
cargo:warning=./compiler-rt/lib/builtins/absvdi2.c:1: error: -m64 not supported in this configuration
exit code: 1

--- stderr
thread 'main' panicked at '

Internal error occurred: Command "powerpc64le-linux-gnu-gcc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-m64" "-fno-builtin" "-fvisibility=hidden" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-o" "/home/ykoehler/rust-build-powerpc-fsl-linux/build/x86_64-unknown-linux-gnu/stage2-std/powerpc64le-unknown-linux-gnu/release/build/compiler_builtins-05a438b00e7bb558/out/./compiler-rt/lib/builtins/absvdi2.o" "-c" "./compiler-rt/lib/builtins/absvdi2.c" with args "powerpc64le-linux-gnu-gcc" did not execute successfully (status code exit code: 1).

', /home/ykoehler/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.28/src/lib.rs:2314:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
...