From 9f20a8a3c24831883f70ee97338ad9a15f0cea23 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 15 Nov 2017 15:58:02 -0800 Subject: [PATCH] [WebAsembly] Build thread code (#22) --- arch/wasm32/reloc.h | 2 ++ arch/wasm32/wasm.syms | 3 --- libc.py | 2 +- src/thread/{clone.c => __clone.c} | 0 4 files changed, 3 insertions(+), 4 deletions(-) rename src/thread/{clone.c => __clone.c} (100%) diff --git a/arch/wasm32/reloc.h b/arch/wasm32/reloc.h index 91b48403..060237b6 100644 --- a/arch/wasm32/reloc.h +++ b/arch/wasm32/reloc.h @@ -1 +1,3 @@ #define LDSO_ARCH "wasm32" + +#define CRTJMP(pc,sp) pc() diff --git a/arch/wasm32/wasm.syms b/arch/wasm32/wasm.syms index dde4a3d9..bd37eb7f 100644 --- a/arch/wasm32/wasm.syms +++ b/arch/wasm32/wasm.syms @@ -27,8 +27,5 @@ __builtin_apply_args __builtin_malloc # Part of musl we still don't compile for wasm -__lock -__unlock -__set_thread_area setjmp longjmp diff --git a/libc.py b/libc.py index e5d013be..6e5893cb 100755 --- a/libc.py +++ b/libc.py @@ -27,7 +27,7 @@ import tempfile verbose = False -DIR_BLACKLIST = ['misc', 'thread'] +DIR_BLACKLIST = ['misc'] BLACKLIST = [ 'puts.c', # Prefer the JS version for now 'abort.c', # Perfer the JS version for now diff --git a/src/thread/clone.c b/src/thread/__clone.c similarity index 100% rename from src/thread/clone.c rename to src/thread/__clone.c