user: implement mlibc as the libc, finally.
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user