Commit Graph

22 Commits

Author SHA1 Message Date
Bananymous ddaaf89c87 BuildSystem: Make default libc a shared library 2024-09-05 12:58:35 +03:00
Bananymous 9aed8dbe6b Toolchain: Build crtbeginS.o crtendS.o and shared libgcc 2024-09-05 12:58:21 +03:00
Bananymous f30947336a BuildSystem: Cleanup cmake files 2024-09-05 12:52:25 +03:00
Bananymous 0bb44d7b75 LibC: Fix errno to work with shared libraries 2024-09-04 21:16:04 +03:00
Bananymous 35743cc8e6 LibC: Compile both static and shared version of LibC
libc target is now set as an alias for libc-static
2024-09-02 21:28:02 +03:00
Bananymous d559339f5f LibC: Compile shared libc as well as static 2024-08-28 17:07:15 +03:00
Bananymous 500f774b7f LibC: Add a lot of stub implementations for different libc functions
some ports want to link against these, but they are not ever called
based on simple testing

This patch adds stubs for
- openlog
- syslog
- getrusage
- mlock
- mprotect
- getpeername
- shutdown
- tzset
- mktime
2024-08-22 15:10:41 +03:00
Bananymous c453a8e2dc LibC: Implement poll() using select 2024-08-22 15:10:41 +03:00
Bananymous 2797fe116f LibC: Add stubs for some functions in {dlfcn,ftw,utime,wchar}.h 2024-08-09 17:01:41 +03:00
Bananymous 0c8cae4cc3 LibC: Move ioctl to <sys/ioctl.h>
Some ports seem to be assuming that ioctl exists there and not in
stropts.h
2024-08-09 16:54:30 +03:00
Bananymous 6fedf06150 LibC: Implement {sig,_,}{longjmp,setjmp} 2024-08-09 15:58:56 +03:00
Bananymous 2a659a9d03 BuildSystem: Fix enable sse definition
__enable_sse was never actually defined for any targets. This also adds
__arch definition for libc (so `utsname` works).
2024-08-09 15:52:42 +03:00
Bananymous 3651306f57 LibC: Implement strto{u,i}max() 2024-08-05 00:53:27 +03:00
Bananymous adf50dffd8 LibC: Implement uname() 2024-07-31 23:54:26 +03:00
Bananymous edc30cd71d LibC: Compile without exceptions
This allows libc to not require __gxx_personality_v0. I can maybe add
C++ back to libc... :D I don't know why I did not research earlier what
this symbols was used for
2024-07-31 23:33:41 +03:00
Bananymous fc6c39e670 LibC: Implement gettimeofday() 2024-07-31 23:26:06 +03:00
Bananymous ca774dfeb5 LibC: Implement setlocale() for C locale 2024-07-30 11:33:02 +03:00
Bananymous 20aa7c79d1 BuildSystem: Fix crt file installation
crt files should be installed always before userpace programs are
linked.
2024-06-22 17:30:00 +03:00
Bananymous 22548a3f4a BuildSystem: Fix crt file installation
crt files for userspace are now a dependency of libc, which means that
everytime libc gets installed, crt files will also install.

This fixes the problem when building libc
2024-06-21 17:10:58 +03:00
Bananymous 9e1b5cbaab BuildSystem: Cleanup CMake code to allow libc only installation
There was no way to just install libc which is required for stdlibc++
2024-06-21 01:45:14 +03:00
Bananymous ad6d95ba52 BuildSystem: Rework the whole cmake build system
Now files are installed using the install() command instead of manually
copying files to their destinations. This allows automatic recompilation
of headers that did not work previously
2024-06-19 09:40:03 +03:00
Bananymous c69919738b BuildSystem: Move all userpace libraries under the userspace directory
As the number of libraries is increasing, root directory starts to
expand. This adds better organization for libraries
2024-06-18 13:14:35 +03:00