longjin 75d66c5566 remove malloc.c | 1 سال پیش | |
---|---|---|
.cargo | 1 سال پیش | |
.vscode | 1 سال پیش | |
core_io | 3 سال پیش | |
include | 1 سال پیش | |
openlibm | 5 سال پیش | |
posix-regex | 6 سال پیش | |
pthreads-emb | 3 سال پیش | |
ralloc | 6 سال پیش | |
src | 1 سال پیش | |
tests | 1 سال پیش | |
.editorconfig | 4 سال پیش | |
.gitignore | 3 سال پیش | |
.gitlab-ci.yml | 1 سال پیش | |
.gitmodules | 2 سال پیش | |
CONTRIBUTING.md | 5 سال پیش | |
Cargo.lock | 1 سال پیش | |
Cargo.toml | 1 سال پیش | |
LICENSE | 6 سال پیش | |
Makefile | 1 سال پیش | |
README.md | 1 سال پیش | |
Xargo.toml | 4 سال پیش | |
bindgen_transform.sh | 6 سال پیش | |
build.rs | 1 سال پیش | |
ci.sh | 4 سال پیش | |
fmt.sh | 6 سال پیش | |
init_dragonos_toolchain.sh | 1 سال پیش | |
redoxer.sh | 1 سال پیش | |
renamesyms.sh | 2 سال پیش | |
rust-toolchain.toml | 1 سال پیش | |
rustfmt.toml | 5 سال پیش |
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