GnoCiYeH 565bc93b46 Merge pull request #22 from DragonOS-Community/update-dsc | vor 1 Jahr | |
---|---|---|
.cargo | vor 1 Jahr | |
.vscode | vor 1 Jahr | |
core_io | vor 3 Jahren | |
include | vor 1 Jahr | |
openlibm | vor 5 Jahren | |
posix-regex | vor 6 Jahren | |
pthreads-emb | vor 3 Jahren | |
ralloc | vor 6 Jahren | |
src | vor 1 Jahr | |
tests | vor 1 Jahr | |
.editorconfig | vor 4 Jahren | |
.gitignore | vor 1 Jahr | |
.gitlab-ci.yml | vor 1 Jahr | |
.gitmodules | vor 1 Jahr | |
CONTRIBUTING.md | vor 5 Jahren | |
Cargo.toml | vor 1 Jahr | |
LICENSE | vor 6 Jahren | |
Makefile | vor 1 Jahr | |
README.md | vor 1 Jahr | |
Xargo.toml | vor 4 Jahren | |
bindgen_transform.sh | vor 6 Jahren | |
build.rs | vor 1 Jahr | |
ci.sh | vor 4 Jahren | |
fmt.sh | vor 6 Jahren | |
init_dragonos_toolchain.sh | vor 1 Jahr | |
redoxer.sh | vor 1 Jahr | |
renamesyms.sh | vor 2 Jahren | |
rust-toolchain.toml | vor 1 Jahr | |
rustfmt.toml | vor 5 Jahren |
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