mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Support thread local storage
This commit is contained in:
parent
91ee2b19d4
commit
55de4ca6b5
197 changed files with 1483 additions and 874 deletions
2
third_party/libcxx/libcxx.mk
vendored
2
third_party/libcxx/libcxx.mk
vendored
|
@ -69,7 +69,7 @@ THIRD_PARTY_LIBCXX_A_SRCS_CC = \
|
|||
|
||||
THIRD_PARTY_LIBCXX_A_SRCS = \
|
||||
$(THIRD_PARTY_LIBCXX_A_SRCS_S) \
|
||||
$(THIRD_PARTY_LIBCXX_A_SRCS_C)
|
||||
$(THIRD_PARTY_LIBCXX_A_SRCS_CC)
|
||||
|
||||
THIRD_PARTY_LIBCXX_A_OBJS = \
|
||||
$(THIRD_PARTY_LIBCXX_A_SRCS_S:%.S=o/$(MODE)/%.o) \
|
||||
|
|
10
third_party/libcxx/random.cc
vendored
10
third_party/libcxx/random.cc
vendored
|
@ -6,6 +6,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "libc/rand/rand.h"
|
||||
#include "third_party/libcxx/__config"
|
||||
|
||||
#if defined(_LIBCPP_USING_WIN32_RANDOM)
|
||||
|
@ -24,15 +25,6 @@
|
|||
#include "third_party/libcxx/stdio.h"
|
||||
#include "third_party/libcxx/stdlib.h"
|
||||
|
||||
#if defined(_LIBCPP_USING_GETENTROPY)
|
||||
#include "libc/isystem/sys/random.h"
|
||||
#elif defined(_LIBCPP_USING_DEV_RANDOM)
|
||||
#include "third_party/libcxx/fcntl.h"
|
||||
#include "third_party/libcxx/unistd.h"
|
||||
#elif defined(_LIBCPP_USING_NACL_RANDOM)
|
||||
#include "third_party/libcxx/nacl/nacl_random.h"
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if defined(_LIBCPP_USING_GETENTROPY)
|
||||
|
|
6
third_party/libcxx/stdexcept_default.hh
vendored
6
third_party/libcxx/stdexcept_default.hh
vendored
|
@ -9,12 +9,6 @@
|
|||
#include "third_party/libcxx/refstring.hh"
|
||||
#include "third_party/libcxx/string"
|
||||
|
||||
/* For _LIBCPPABI_VERSION */
|
||||
#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \
|
||||
(defined(LIBCXX_BUILDING_LIBCXXABI) || defined(LIBCXXRT))
|
||||
#include "third_party/libcxx/cxxabi.h"
|
||||
#endif
|
||||
|
||||
static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char*), "");
|
||||
|
||||
namespace std // purposefully not using versioning namespace
|
||||
|
|
4
third_party/libcxx/system_error.cc
vendored
4
third_party/libcxx/system_error.cc
vendored
|
@ -19,10 +19,6 @@
|
|||
#include "third_party/libcxx/string.h"
|
||||
#include "third_party/libcxx/__debug"
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
#include "third_party/libcxx/android/api-level.h"
|
||||
#endif
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
// class error_category
|
||||
|
|
1
third_party/lua/lua.mk
vendored
1
third_party/lua/lua.mk
vendored
|
@ -81,6 +81,7 @@ o/$(MODE)/third_party/lua/lua.com: \
|
|||
@$(COMPILE) -AZIP -T$@ o/$(MODE)/third_party/zip/zip.com -0qj $@ \
|
||||
o/$(MODE)/third_party/lua/.lua/.symtab
|
||||
|
||||
o/$(MODE)/third_party/lua/lmathlib.o \
|
||||
o//third_party/lua/lgc.o: \
|
||||
OVERRIDE_CFLAGS += \
|
||||
-O2
|
||||
|
|
4
third_party/python/python.mk
vendored
4
third_party/python/python.mk
vendored
|
@ -1152,6 +1152,7 @@ THIRD_PARTY_PYTHON_STAGE2_A_DIRECTDEPS = \
|
|||
THIRD_PARTY_MBEDTLS \
|
||||
THIRD_PARTY_SQLITE3 \
|
||||
THIRD_PARTY_ZLIB \
|
||||
THIRD_PARTY_XED \
|
||||
TOOL_ARGS
|
||||
|
||||
THIRD_PARTY_PYTHON_STAGE2_A_DEPS = \
|
||||
|
@ -2090,6 +2091,7 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS_DIRECTDEPS = \
|
|||
THIRD_PARTY_PYTHON_STAGE2 \
|
||||
THIRD_PARTY_PYTHON_PYTEST \
|
||||
THIRD_PARTY_LINENOISE \
|
||||
THIRD_PARTY_XED \
|
||||
TOOL_ARGS
|
||||
|
||||
THIRD_PARTY_PYTHON_PYTEST_PYMAINS_DEPS = \
|
||||
|
@ -4252,6 +4254,7 @@ THIRD_PARTY_PYTHON_PYTHON_DIRECTDEPS = \
|
|||
THIRD_PARTY_PYTHON_STAGE1 \
|
||||
THIRD_PARTY_PYTHON_STAGE2 \
|
||||
THIRD_PARTY_PYTHON_PYTEST \
|
||||
THIRD_PARTY_XED \
|
||||
TOOL_ARGS
|
||||
|
||||
o/$(MODE)/third_party/python/python.pkg: \
|
||||
|
@ -4298,6 +4301,7 @@ THIRD_PARTY_PYTHON_FREEZE_DIRECTDEPS = \
|
|||
LIBC_UNICODE \
|
||||
LIBC_X \
|
||||
THIRD_PARTY_GETOPT \
|
||||
THIRD_PARTY_XED \
|
||||
THIRD_PARTY_PYTHON_STAGE1
|
||||
|
||||
o/$(MODE)/third_party/python/freeze.pkg: \
|
||||
|
|
10
third_party/python/repl.c
vendored
10
third_party/python/repl.c
vendored
|
@ -9,10 +9,17 @@
|
|||
#include "libc/bits/safemacros.internal.h"
|
||||
#include "libc/bits/weaken.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/calls/sigbits.h"
|
||||
#include "libc/calls/struct/siginfo.h"
|
||||
#include "libc/calls/struct/sigset.h"
|
||||
#include "libc/calls/ucontext.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/gc.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
@ -20,7 +27,9 @@
|
|||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/fileno.h"
|
||||
#include "libc/sysv/consts/prot.h"
|
||||
#include "libc/sysv/consts/sig.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/unicode/locale.h"
|
||||
#include "libc/x/x.h"
|
||||
#include "third_party/linenoise/linenoise.h"
|
||||
|
@ -41,6 +50,7 @@
|
|||
#include "third_party/python/Include/pythonrun.h"
|
||||
#include "third_party/python/Include/unicodeobject.h"
|
||||
#include "third_party/python/Include/yoink.h"
|
||||
#include "third_party/xed/x86.h"
|
||||
#include "tool/args/args.h"
|
||||
/* clang-format off */
|
||||
|
||||
|
|
6
third_party/xed/xed.mk
vendored
6
third_party/xed/xed.mk
vendored
|
@ -40,7 +40,7 @@ THIRD_PARTY_XED_A_DIRECTDEPS = \
|
|||
THIRD_PARTY_XED_A_DEPS := \
|
||||
$(call uniq,$(foreach x,$(THIRD_PARTY_XED_A_DIRECTDEPS),$($(x))))
|
||||
|
||||
o/$(MODE)/third_party/xed/x86ild.greg.o: \
|
||||
o/$(MODE)/third_party/xed/x86ild.greg.o: \
|
||||
OVERRIDE_CFLAGS += \
|
||||
-mstringop-strategy=unrolled_loop
|
||||
|
||||
|
@ -53,6 +53,10 @@ $(THIRD_PARTY_XED_A).pkg: \
|
|||
$(THIRD_PARTY_XED_A_OBJS) \
|
||||
$(foreach x,$(THIRD_PARTY_XED_A_DIRECTDEPS),$($(x)_A).pkg)
|
||||
|
||||
o/$(MODE)/third_party/xed/x86ild.greg.o: \
|
||||
OVERRIDE_CFLAGS += \
|
||||
-O3
|
||||
|
||||
HIRD_PARTY_XED_LIBS = $(foreach x,$(THIRD_PARTY_XED_ARTIFACTS),$($(x)))
|
||||
THIRD_PARTY_XED_SRCS = $(foreach x,$(THIRD_PARTY_XED_ARTIFACTS),$($(x)_SRCS))
|
||||
THIRD_PARTY_XED_HDRS = $(foreach x,$(THIRD_PARTY_XED_ARTIFACTS),$($(x)_HDRS))
|
||||
|
|
4
third_party/zlib/gz/gzread.c
vendored
4
third_party/zlib/gz/gzread.c
vendored
|
@ -1,5 +1,9 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/zlib/gz/gzguts.inc"
|
||||
#include "third_party/zlib/zlib.h"
|
||||
// clang-format off
|
||||
|
||||
/* gzread.c -- zlib functions for reading gzip files
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue