I am working on porting rust on AIX (powerpc64 big endian). I use a nightly version of LLVM because AIX support is not yet on the stable version. I have rebuilt rust 1.49.0 on a PPC64 Linux (Fedora) using
x.py. I have added a new triplet powerpc64-ibm-aix (according LLVM triplet), and the newly built rustc prints it when I type
rustc --print target-list. I follow this way.
So, I am now trying to compile:
- a minimal file on Linux, for AIX, using this rustc;
- rustc and stdlib on Linux for AIX.
For the first point, rustc says he needs the standard library I have not built yet. I can reduce the work using no-std in order to use the core library only. However, the core library is not yet built for AIX. Do you have a way to bypass also the core library to compile a minimal file?
For AIX rustc and standard / core library, I face issues related to the not full port of LLVM on AIX:
Building stage1 std artifacts (powerpc64le-unknown-linux-gnu -> powerpc64-ibm-aix) running: "/root/.rustup/toolchains/stable-powerpc64le-unknown-linux-gnu/bin/cargo" "build" "--target" "powerpc64-ibm-aix" "-j" "32" "--release" "--frozen" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/root/rpmbuild/BUILD/rust/library/test/Cargo.toml" "--message-format" "json-render-diagnostics" Compiling core v0.0.0 (/root/rpmbuild/BUILD/rust/library/core) Compiling rustc-std-workspace-core v1.99.0 (/root/rpmbuild/BUILD/rust/library/rustc-std-workspace-core) Compiling compiler_builtins v0.1.36 Compiling libc v0.2.79 LLVM ERROR: XCOFF explicit sections not yet implemented. error: unknown directive | note: instantiated into assembly here --> <inline asm>:2:13 | 2 | .section .llvmbc,"e" | ^ error: unknown directive | note: instantiated into assembly here --> <inline asm>:3:13 | 3 | .section .llvmcmd,"e" | ^ Did not run successfully: exit code: 101
We know XCOFF is not completely implemented. Do you have a way to workaround this?
Moreover, it is hard to find the minimal command to reproduce the bug: the commandline given after "running" has a different output if I run it directly. After set of the relevant variable, I have typically
error[E0554]: `#![feature]` may not be used on the stable release channel
I want the exact command and environment set by
x.py for my report to the LLVM team. Moreover, with the right command, I will be able to add flags in order to check the assembler generated.