为DragonOS移植了的relibc

Jeremy Soller 04d2f296a9 Fix for epoll on i686 redox il y a 2 ans
core_io 9eeb73319d Update core_io submodule to a valid commit. il y a 3 ans
include a37916101f Add M_2_PI il y a 2 ans
openlibm b3dda7519d Update openlibm il y a 6 ans
posix-regex 0684fb6e4c Bump posix-regex version il y a 6 ans
pthreads-emb 9c423abb5f Update pthreads-emb il y a 4 ans
ralloc 6c11a18240 Go back to patched ralloc il y a 6 ans
src 04d2f296a9 Fix for epoll on i686 redox il y a 2 ans
tests 393489b38b Add wcswidth and test il y a 2 ans
.editorconfig 6952a079ae Fix CI il y a 4 ans
.gitignore a7480ea656 Fix global symbols relocations il y a 4 ans
.gitlab-ci.yml 9a7dfc4f4d Disable test:redox for now il y a 2 ans
.gitmodules 2186cd1fbd Implement fexec in userspace. il y a 2 ans
CONTRIBUTING.md ff874c87d7 tests: Fix function signatures il y a 6 ans
Cargo.lock 9c16224e82 Update libc crate il y a 2 ans
Cargo.toml f65c1c27c7 Implement wcwidth il y a 2 ans
LICENSE ba515d83df Create LICENSE il y a 7 ans
Makefile ba87e4893a Create empty libdl and librt libraries il y a 2 ans
README.md 59cbc5be32 Provide possible fix for `x86_64-linux-gnu-ar: command not found` (or similar) in README.md il y a 2 ans
Xargo.toml ae34ade595 Use path to patch compiler-builtins il y a 4 ans
bindgen_transform.sh 799c8828c2 mkdir and rmdir il y a 7 ans
build.rs a28e9ae378 Add pthreads to includes for C files il y a 4 ans
ci.sh 9f86748a58 Fix make libs in CI il y a 5 ans
fmt.sh bab4e2896a Format il y a 6 ans
redoxer.sh 903393574e redoxer.sh will clear build-std from CARGOFLAGS il y a 2 ans
renamesyms.sh 70a8fca3c1 Use target binutils for renamesyms il y a 2 ans
rust-toolchain.toml 0bd476d28a Update to new Rust toolchain il y a 2 ans
rustfmt.toml b8c50c7c64 Format il y a 5 ans

README.md

relibc build

relibc is a portable POSIX C standard library written in Rust. It is under heavy development, and currently supports Redox and Linux.

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.

Building

Just run make all.

Issues

I'm building for my own platform which I run, and am getting 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

Contributing

Supported OSes

  • Redox OS
  • Linux

Supported architectures

  • x86_64
  • Aarch64