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