GnoCiYeH 931a8760c4 Merge branch 'dragonos-relibc' into update-dsc | 1 anno fa | |
---|---|---|
.cargo | 1 anno fa | |
.vscode | 1 anno fa | |
core_io | 3 anni fa | |
include | 1 anno fa | |
openlibm | 5 anni fa | |
posix-regex | 6 anni fa | |
pthreads-emb | 3 anni fa | |
ralloc | 6 anni fa | |
src | 1 anno fa | |
tests | 1 anno fa | |
.editorconfig | 4 anni fa | |
.gitignore | 1 anno fa | |
.gitlab-ci.yml | 1 anno fa | |
.gitmodules | 1 anno fa | |
CONTRIBUTING.md | 5 anni fa | |
Cargo.toml | 1 anno fa | |
LICENSE | 6 anni fa | |
Makefile | 1 anno fa | |
README.md | 1 anno fa | |
Xargo.toml | 4 anni fa | |
bindgen_transform.sh | 6 anni fa | |
build.rs | 1 anno fa | |
ci.sh | 4 anni fa | |
fmt.sh | 6 anni fa | |
init_dragonos_toolchain.sh | 1 anno fa | |
redoxer.sh | 1 anno fa | |
renamesyms.sh | 2 anni fa | |
rust-toolchain.toml | 1 anno fa | |
rustfmt.toml | 5 anni fa |
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