Refactor some code

- Write tests for cthreads
- Fix bugs in pe2.com tool
- Fix ASAN issue with GetDosEnviron()
- Consolidate the cthread header files
- Some code size optimizations for MODE=
- Attempted to squash a tls linker warning
- Attempted to get futexes working on FreeBSD
This commit is contained in:
Justine Tunney 2022-05-28 05:50:01 -07:00
parent 909e54510d
commit 425ff5dff0
61 changed files with 529 additions and 382 deletions

View file

@ -33,6 +33,7 @@ TEST_LIBC_THREAD_DIRECTDEPS = \
LIBC_STUBS \
LIBC_SYSV \
LIBC_THREAD \
LIBC_TIME \
LIBC_TESTLIB
TEST_LIBC_THREAD_DEPS := \
@ -51,20 +52,6 @@ o/$(MODE)/test/libc/thread/%.com.dbg: \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
$(TEST_LIBC_THREAD_OBJS): \
DEFAULT_CCFLAGS += \
-fno-builtin
o/$(MODE)/test/libc/thread/getenv_test.com.runs: \
o/$(MODE)/test/libc/thread/getenv_test.com
@HELLO=THERE build/runit $@ $<
o/$(MODE)/test/libc/thread/fun_test.o \
o/$(MODE)/test/libc/thread/itsatrap_test.o: \
OVERRIDE_CFLAGS += \
-fno-sanitize=all \
-ftrapv
.PHONY: o/$(MODE)/test/libc/thread
o/$(MODE)/test/libc/thread: \
$(TEST_LIBC_THREAD_BINS) \