user: implement mlibc as the libc, finally.

It's finally done..

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
kaguya
2026-05-02 03:31:49 -04:00
parent 2fa39ad85a
commit 9a9b91c940
2387 changed files with 152741 additions and 315 deletions
@@ -0,0 +1 @@
_Thread_local __attribute__((aligned(8))) char bar_thread_local[8] = "Hello!";
@@ -0,0 +1 @@
_Thread_local __attribute__((aligned(16))) char foo_thread_local[8] = "Hello!";
@@ -0,0 +1,7 @@
libfoo = shared_library('foo', 'libfoo.c')
libbar = shared_library('bar', 'libbar.c')
test_link_with = [libfoo, libbar]
libfoo_native = shared_library('native-foo', 'libfoo.c', native: true)
libbar_native = shared_library('native-bar', 'libbar.c', native: true)
test_native_link_with = [libfoo_native, libbar_native]
@@ -0,0 +1,12 @@
#include <assert.h>
#include <stdint.h>
extern _Thread_local char foo_thread_local[];
extern _Thread_local char bar_thread_local[];
int main() {
assert(!((uintptr_t)foo_thread_local & (16 - 1)));
assert(!((uintptr_t)bar_thread_local & (8 - 1)));
return 0;
}