LoGin 27e779dc23 bugfix: 修正sys_rt_sigreturn的汇编,错误的压多了一个栈指针的问题 (#25) | 11 months ago | |
---|---|---|
.cargo | 1 year ago | |
.vscode | 1 year ago | |
core_io | 3 years ago | |
include | 1 year ago | |
openlibm | 5 years ago | |
posix-regex | 6 years ago | |
pthreads-emb | 3 years ago | |
ralloc | 6 years ago | |
src | 11 months ago | |
tests | 1 year ago | |
.editorconfig | 4 years ago | |
.gitignore | 1 year ago | |
.gitlab-ci.yml | 1 year ago | |
.gitmodules | 1 year ago | |
CONTRIBUTING.md | 5 years ago | |
Cargo.toml | 1 year ago | |
LICENSE | 6 years ago | |
Makefile | 1 year ago | |
README.md | 1 year ago | |
Xargo.toml | 4 years ago | |
bindgen_transform.sh | 6 years ago | |
build.rs | 1 year ago | |
ci.sh | 4 years ago | |
fmt.sh | 6 years ago | |
init_dragonos_toolchain.sh | 1 year ago | |
redoxer.sh | 1 year ago | |
renamesyms.sh | 2 years ago | |
rust-toolchain.toml | 1 year ago | |
rustfmt.toml | 5 years ago |
relibc is a portable POSIX C standard library written in Rust. It is under heavy development, and currently supports Redox, Linux and DragonOS.
The motivation for this project is twofold: Reduce issues the redox crew was having with newlib, and create a safer alternative to a C standard library written in C. It is mainly designed to be used under redox, as an alternative to newlib, but it also supports linux syscalls via the sc crate.
Just run make all
.
You can follow the instructions to build relibc for DragonOS:
mkdir -p sysroot/usr
make -j $(nproc) && DESTDIR=sysroot/usr make install -j $(nproc)
x86_64-linux-gnu-ar: command not found
(or similar)The Makefile expects the gnu compiler tools prefixed with the platform specifier, as would be present when you'd install a cross compiler. Since you are building for your own platform, some distros (like Manjaro) don't install/symlink the prefixed executables. An easy fix would be to replace the corresponding lines in the Makefile, e.g.
ifeq ($(TARGET),x86_64-unknown-linux-gnu)
export CC=x86_64-linux-gnu-gcc
- export LD=x86_64-linux-gnu-ld
- export AR=x86_64-linux-gnu-ar
+ export LD=ld
+ export AR=ar
export OBJCOPY=x86_64-linux-gnu-objcopy
endif