LoGin 27e779dc23 bugfix: 修正sys_rt_sigreturn的汇编,错误的压多了一个栈指针的问题 (#25) | 11 bulan lalu | |
---|---|---|
.cargo | 1 tahun lalu | |
.vscode | 1 tahun lalu | |
core_io | 3 tahun lalu | |
include | 1 tahun lalu | |
openlibm | 5 tahun lalu | |
posix-regex | 6 tahun lalu | |
pthreads-emb | 3 tahun lalu | |
ralloc | 6 tahun lalu | |
src | 11 bulan lalu | |
tests | 1 tahun lalu | |
.editorconfig | 4 tahun lalu | |
.gitignore | 1 tahun lalu | |
.gitlab-ci.yml | 1 tahun lalu | |
.gitmodules | 1 tahun lalu | |
CONTRIBUTING.md | 5 tahun lalu | |
Cargo.toml | 1 tahun lalu | |
LICENSE | 6 tahun lalu | |
Makefile | 1 tahun lalu | |
README.md | 1 tahun lalu | |
Xargo.toml | 4 tahun lalu | |
bindgen_transform.sh | 6 tahun lalu | |
build.rs | 1 tahun lalu | |
ci.sh | 4 tahun lalu | |
fmt.sh | 6 tahun lalu | |
init_dragonos_toolchain.sh | 1 tahun lalu | |
redoxer.sh | 1 tahun lalu | |
renamesyms.sh | 2 tahun lalu | |
rust-toolchain.toml | 1 tahun lalu | |
rustfmt.toml | 5 tahun lalu |
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