about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-07 05:22:21 +0000
committerbors <bors@rust-lang.org>2023-12-07 05:22:21 +0000
commit568f6a8641e391ffcdcdb03e79d0901731d8d399 (patch)
treea2c80134e9c15400073b8236a707c3d407a9dd7b /src
parentc9d85d67c48a4d9b8b78ed9d7273b4608f0fef02 (diff)
parente353eb91fb793c5ec7cb12f7c99a13d55e05fba1 (diff)
downloadrust-568f6a8641e391ffcdcdb03e79d0901731d8d399.tar.gz
rust-568f6a8641e391ffcdcdb03e79d0901731d8d399.zip
Auto merge of #116565 - Sword-Destiny:master, r=Amanieu
add teeos std impl

add teeos std library implement.

this MR is draft untill the libc update to 0.2.150

this MR is the final step for suppot rust in teeos.
first step(add target): https://github.com/rust-lang/rust/pull/113480
second step(add teeos libc): https://github.com/rust-lang/libc/pull/3333
Diffstat (limited to 'src')
-rw-r--r--src/doc/rustc/src/platform-support/aarch64-unknown-teeos.md13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/doc/rustc/src/platform-support/aarch64-unknown-teeos.md b/src/doc/rustc/src/platform-support/aarch64-unknown-teeos.md
index 9233a36db3d..7a6609b2d76 100644
--- a/src/doc/rustc/src/platform-support/aarch64-unknown-teeos.md
+++ b/src/doc/rustc/src/platform-support/aarch64-unknown-teeos.md
@@ -39,7 +39,7 @@ Create the following shell scripts that wrap Clang from the OpenHarmony SDK:
 ```sh
 #!/bin/sh
 exec /path/to/ohos-sdk/linux/native/llvm/bin/clang \
-  --target aarch64-linux-gnu \
+  -target aarch64-linux-gnu \
   "$@"
 ```
 
@@ -48,7 +48,7 @@ exec /path/to/ohos-sdk/linux/native/llvm/bin/clang \
 ```sh
 #!/bin/sh
 exec /path/to/ohos-sdk/linux/native/llvm/bin/clang++ \
-  --target aarch64-linux-gnu \
+  -target aarch64-linux-gnu \
   "$@"
 ```
 
@@ -81,6 +81,13 @@ ranlib = "/path/to/ohos-sdk/linux/native/llvm/bin/llvm-ranlib"
 llvm-config = "/path/to/ohos-sdk/linux/native/llvm/bin/llvm-config"
 ```
 
+```text
+note: You need to insert "/usr/include/x86_64-linux-gnu/" into environment variable: $C_INCLUDE_PATH
+ if some header files like bits/xxx.h not found.
+note: You can install gcc-aarch64-linux-gnu,g++-aarch64-linux-gnu if some files like crti.o not found.
+note: You may need to install libc6-dev-i386 libc6-dev if "gnu/stubs-32.h" not found.
+```
+
 ## Building Rust programs
 
 Rust does not yet ship pre-compiled artifacts for this target. To compile for
@@ -91,7 +98,7 @@ this target, you will either need to build Rust with the target enabled (see
 You will need to configure the linker to use in `~/.cargo/config`:
 ```toml
 [target.aarch64-unknown-teeos]
-linker = "/path/to/aarch64-unknown-teeos-clang.sh"
+linker = "/path/to/aarch64-unknown-teeos-clang.sh" # or aarch64-linux-gnu-ld
 ```
 
 ## Testing