Skip to content

Split libc into MOS dependant and independent part #19

Description

@maxgerhardt

For more reusability along non-MOS projects, I would love if if the libc was clearly divided into a non-MOS dependant into an agnostic part.

Things like the implementations of abs(), atol(), atoll() etc. don't depend on anything, but things like fopen(), putch() etc does.

In my baremetal or Arduino core implementation, I'd love to take in all the optimized implementations of those functions and still have no dependency on MOS. Right now I just have to selectively copy the non-MOS source files I need.

With the newlib C library (also newlib-nano and picolibc?), they have the concept of syscalls that cleanly abstracts that away: https://wiki.osdev.org/Porting_Newlib

So I'd like to have a generic libc with empty / non-implemented system calls (similar to --specs=nosys.specs) and then the part that implements the syscalls with the MOS APIs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions