Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port llvm-libc #421

Closed
mysterymath opened this issue Nov 29, 2023 · 2 comments
Closed

Port llvm-libc #421

mysterymath opened this issue Nov 29, 2023 · 2 comments
Labels
enhancement New feature or request p1

Comments

@mysterymath
Copy link
Member

We need a full, standards compliant libc with a license that allows statically linking against it without virally requiring inclusion of a license disclaimer. There are two libc implementations with this property: llvm-libc and pdclib.

Given that we already a LLVM project, we should see if llvm-libc can be made to work well on the 6502, and if so, incorporated into the SDK like the compiler-rt builtins.

@mysterymath
Copy link
Member Author

I got a chance to play around with llvm-libc for another project.

llvm-libc is quite immature and incomplete. That's not intrinsically a huge problem for us, since we can paper over any holes in it ourselves. However, it appears that its immaturity also implies an immaturity of its build configuration; it appears to be quite difficult to get it to build outside the precise environments where it is currently used. It takes a lot of work to generalize a build system, and llvm-libc's build system is extremely complex.

I think it'll be a better idea to go with the backup plan: to use pieces from the pdclibc (https://github.com/DevSolar/pdclib) public domain C library to fill out the remaining portion of the SDK. This is specifically intended to be as simple and straightforward of an implementation as possible, so it should be relatively straightforward to tune pieces for the 6502 as they go in. This will likely produce better results than relying on llvm-libc anyway, although we'll be more likely to encounter issues along the way.

@mysterymath
Copy link
Member Author

Obsoleted by llvm-mos/llvm-mos-sdk#271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p1
Projects
None yet
Development

No branches or pull requests

1 participant