aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-01-02 17:28:59 -0300
committerEuAndreh <eu@euandre.org>2024-01-05 05:43:22 -0300
commit2e96fc06f325110af8c7177c0c60694eed5fd245 (patch)
treeba4e2ae8c50136cbf2f00a0edc8f31c90901bb64
parentsrc/internal/version.h: Check-in file with fixed value for compilation (diff)
downloadgrovel-2e96fc06f325110af8c7177c0c60694eed5fd245.tar.gz
grovel-2e96fc06f325110af8c7177c0c60694eed5fd245.tar.xz
Fix the build system.
The improvements are: - use most of the default "Makefile" for standard packaging; - also use the default ".gitignore" with for the derived assets; - don't impose so many $CFLAGS on the user. GCC still needs to be given the `-ffreestanding` flag explicitly for us to get a good binary; - stop using ad-hoc tools/* scripts, and avoid the code-generation anti-pattern overall on the build. Some of the generated files were checked-in, and some were removed; - remove empty files; - use POSIX make(1) over gmake; - add fuzz targets; - partial "install" and "uninstall" targets; - complete "clean" target. The shortcomings are: - only working on x86_64. More platforms coming soon; - code is still messy: way too many warnings, GNU/BSD specific extensions, inline assembly, and all kinds of unportable code; - still only works with GCC and GCC-like compilers, and completly fails with tcc(1) and cproc(1); - the `deps.mk` file is being maintained manually. As I work on the source files I'll finish automating its generation with `mkdeps.sh`; - still seems to be coupled with Linux; - still is missing tests setup; - still uses `#include <$NAME.h>` instead of the correct `#include "$NAME.h"` form. The generated libgrovel.a did match the previous lib/libc.a 100%.
-rw-r--r--.envrc27
-rw-r--r--.gitignore18
-rw-r--r--Makefile424
-rw-r--r--deps.mk1951
-rw-r--r--doc/grovel.CHANGELOG.en.7.in (renamed from crt/crti.c)0
-rw-r--r--doc/grovel.README.en.7.in (renamed from crt/crtn.c)0
-rw-r--r--doc/grovel.TODOs.en.7.in (renamed from src/setjmp/longjmp.c)0
-rw-r--r--doc/grovel.en.1.in (renamed from src/setjmp/setjmp.c)0
-rw-r--r--doc/grovel.recipe.en.7.in (renamed from src/signal/sigsetjmp.c)0
-rw-r--r--doc/grovel.tutorial.en.7.in (renamed from src/thread/syscall_cp.c)0
-rw-r--r--doc/grovel.why.en.7.in0
-rw-r--r--f.c10
-rw-r--r--include/bits/alltypes.h415
-rw-r--r--include/bits/syscall.h715
-rwxr-xr-xmkdeps.sh28
-rw-r--r--src/config.h.in0
-rw-r--r--src/grovel.h0
-rw-r--r--src/main.c4
-rw-r--r--tests/fuzz/another.c17
-rw-r--r--tests/fuzz/hello.c17
-rw-r--r--tools/add-cfi.common.awk26
-rw-r--r--tools/add-cfi.i386.awk209
-rw-r--r--tools/add-cfi.x86_64.awk196
-rw-r--r--tools/lib.sh49
-rwxr-xr-xtools/makehelp.sh149
-rwxr-xr-xtools/manpages.sh126
-rw-r--r--tools/mkalltypes.sed15
27 files changed, 3696 insertions, 700 deletions
diff --git a/.envrc b/.envrc
new file mode 100644
index 00000000..5d842f17
--- /dev/null
+++ b/.envrc
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+export CFLAGS='
+ -D_POSIX_C_SOURCE=200809L
+ -D_XOPEN_SOURCE=700
+ -Iarch/x86_64
+ -Iarch/generic
+ -Isrc/include
+ -Isrc/internal
+ -Iinclude
+ -std=c99
+ -fsanitize=undefined
+ -fsanitize-trap
+ -ffreestanding
+ -Wall
+ -Wextra
+ -Wfatal-errors
+ -Wconversion
+ -Wvla
+ -Wshadow
+ -Wfloat-equal
+ -Wundef
+ -Wdouble-promotion
+'
+ # -Wpedantic
+ # -Werror
+CFLAGS="$(echo "$CFLAGS" | grep . | tr -d '\t' | tr '\n' ' ')"
diff --git a/.gitignore b/.gitignore
index e9e283b0..2466ce8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,13 @@
+/*.a
+/src/config.h
*.o
-*.lo
-*.a
-*.so
-*.so.1
-lib/musl-gcc.specs
-/obj/
+*.to
+*.xa
+*.bin
+/src/*.c.txt
+/src/*.cat
+/doc/*.[0-9]
+/tests/fuzz/*.o
+/tests/fuzz/*.xa
+/tests/fuzz/*.bin
+/tests/fuzz/corpus/
diff --git a/Makefile b/Makefile
index 5bf31622..7a788f02 100644
--- a/Makefile
+++ b/Makefile
@@ -1,284 +1,212 @@
-#
-# Makefile for musl (requires GNU make)
-#
-# This is how simple every makefile should be...
-# No, I take that back - actually most should be less than half this size.
-#
-# Use config.mak to override any of the following variables.
-# Do not make changes here.
-#
+.POSIX:
+DATE = 1970-01-01
+VERSION = 0.1.0
+NAME = grovel
+NAME_UC = $(NAME)
+MAILING_LIST = public-inbox
+LANGUAGES =
+## Installation prefix. Defaults to "/usr".
+PREFIX = /usr
+BINDIR = $(PREFIX)/bin
+LIBDIR = $(PREFIX)/lib
+INCLUDEDIR = $(PREFIX)/include
+SRCDIR = $(PREFIX)/src/$(NAME)
+SHAREDIR = $(PREFIX)/share
+LOCALEDIR = $(SHAREDIR)/locale
+MANDIR = $(SHAREDIR)/man
+EXEC = ./
+## Where to store the installation. Empty by default.
+DESTDIR =
+LDLIBS =
+
+
+
+.SUFFIXES:
+.SUFFIXES: .in .c .o .to .xa .bin .msg .cat
+.SUFFIXES: .s
+
+.in:
+ sed \
+ -e 's:@VERSION@:$(VERSION):g' \
+ -e 's:@DATE@:$(DATE):g' \
+ -e 's:@NAME@:$(NAME):g' \
+ < $< > $@
+ if [ -x $< ]; then chmod +x $@; fi
+
+.s.o:
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+.c.o:
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+.c.to:
+ $(CC) $(CFLAGS) -DTEST -o $@ -c $<
+
+.xa.bin:
+ $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
-srcdir = .
-exec_prefix = /usr/local
-bindir = $(exec_prefix)/bin
-
-prefix = /usr/local/musl
-includedir = $(prefix)/include
-libdir = $(prefix)/lib
-syslibdir = /lib
-
-MALLOC_DIR = mallocng
-SRC_DIRS = $(addprefix $(srcdir)/,src/* src/malloc/$(MALLOC_DIR) crt ldso $(COMPAT_SRC_DIRS))
-BASE_GLOBS = $(addsuffix /*.c,$(SRC_DIRS))
-ARCH_GLOBS = $(addsuffix /$(ARCH)/*.[csS],$(SRC_DIRS))
-BASE_SRCS = $(sort $(wildcard $(BASE_GLOBS)))
-ARCH_SRCS = $(sort $(wildcard $(ARCH_GLOBS)))
-BASE_OBJS = $(patsubst $(srcdir)/%,%.o,$(basename $(BASE_SRCS)))
-ARCH_OBJS = $(patsubst $(srcdir)/%,%.o,$(basename $(ARCH_SRCS)))
-REPLACED_OBJS = $(sort $(subst /$(ARCH)/,/,$(ARCH_OBJS)))
-ALL_OBJS = $(addprefix obj/, $(filter-out $(REPLACED_OBJS), $(sort $(BASE_OBJS) $(ARCH_OBJS))))
-
-LIBC_OBJS = $(filter obj/src/%,$(ALL_OBJS)) $(filter obj/compat/%,$(ALL_OBJS))
-LDSO_OBJS = $(filter obj/ldso/%,$(ALL_OBJS:%.o=%.lo))
-CRT_OBJS = $(filter obj/crt/%,$(ALL_OBJS))
-
-AOBJS = $(LIBC_OBJS)
-LOBJS = $(LIBC_OBJS:.o=.lo)
-GENH = obj/include/bits/alltypes.h obj/include/bits/syscall.h
-GENH_INT = obj/src/internal/version.h
-IMPH = $(addprefix $(srcdir)/, src/internal/stdio_impl.h src/internal/pthread_impl.h src/internal/locale_impl.h src/internal/libc.h)
-
-LDFLAGS =
-LDFLAGS_AUTO =
-LIBCC = -lgcc
-CPPFLAGS =
-CFLAGS =
-CFLAGS_AUTO = -Os -pipe
-CFLAGS_C99FSE = -std=c99 -ffreestanding -nostdinc
-
-CFLAGS_ALL = $(CFLAGS_C99FSE)
-CFLAGS_ALL += -D_XOPEN_SOURCE=700 -I$(srcdir)/arch/$(ARCH) -I$(srcdir)/arch/generic -Iobj/src/internal -I$(srcdir)/src/include -I$(srcdir)/src/internal -Iobj/include -I$(srcdir)/include
-CFLAGS_ALL += $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS)
-
-LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS)
-
-AR = $(CROSS_COMPILE)ar
-RANLIB = $(CROSS_COMPILE)ranlib
-INSTALL = $(srcdir)/tools/install.sh
-
-ARCH_INCLUDES = $(wildcard $(srcdir)/arch/$(ARCH)/bits/*.h)
-GENERIC_INCLUDES = $(wildcard $(srcdir)/arch/generic/bits/*.h)
-INCLUDES = $(wildcard $(srcdir)/include/*.h $(srcdir)/include/*/*.h)
-ALL_INCLUDES = $(sort $(INCLUDES:$(srcdir)/%=%) $(GENH:obj/%=%) $(ARCH_INCLUDES:$(srcdir)/arch/$(ARCH)/%=include/%) $(GENERIC_INCLUDES:$(srcdir)/arch/generic/%=include/%))
-
-EMPTY_LIB_NAMES = m rt pthread crypt util xnet resolv dl
-EMPTY_LIBS = $(EMPTY_LIB_NAMES:%=lib/lib%.a)
-CRT_LIBS = $(addprefix lib/,$(notdir $(CRT_OBJS)))
-STATIC_LIBS = lib/libc.a
-SHARED_LIBS = lib/libc.so
-TOOL_LIBS = lib/musl-gcc.specs
-ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS)
-ALL_TOOLS = obj/musl-gcc
-
-WRAPCC_GCC = gcc
-WRAPCC_CLANG = clang
-
-LDSO_PATHNAME = $(syslibdir)/ld-musl-$(ARCH)$(SUBARCH).so.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# This version of config.mak was generated by:
-# ./configure --enable-debug --disable-shared
-# Any changes made here will be lost if configure is re-run
-AR = $(CROSS_COMPILE)ar
-RANLIB = $(CROSS_COMPILE)ranlib
-ARCH = x86_64
-SUBARCH =
-ASMSUBARCH =
-srcdir = .
-prefix = /usr/local/musl
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
-libdir = $(prefix)/lib
-includedir = $(prefix)/include
-syslibdir = /lib
-CC = gcc
-CFLAGS =
-CFLAGS_AUTO = -g -O2 -fno-align-jumps -fno-align-functions -fno-align-loops -fno-align-labels -fira-region=one -fira-hoist-pressure -freorder-blocks-algorithm=simple -fno-prefetch-loop-arrays -fno-tree-ch -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -Wno-pointer-to-int-cast -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=discarded-qualifiers -Werror=discarded-array-qualifiers -Waddress -Warray-bounds -Wchar-subscripts -Wduplicate-decl-specifier -Winit-self -Wreturn-type -Wsequence-point -Wstrict-aliasing -Wunused-function -Wunused-label -Wunused-variable
-CFLAGS_C99FSE = -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -fno-strict-aliasing -Wa,--noexecstack
-CFLAGS_MEMOPS = -fno-tree-loop-distribute-patterns
-CFLAGS_NOSSP = -fno-stack-protector
-CPPFLAGS =
-LDFLAGS =
-LDFLAGS_AUTO = -Wl,--sort-section,alignment -Wl,--sort-common -Wl,--gc-sections -Wl,--hash-style=both -Wl,--no-undefined -Wl,--exclude-libs=ALL
-CROSS_COMPILE =
-LIBCC = -lgcc -lgcc_eh
-OPTIMIZE_GLOBS = internal/*.c malloc/*.c string/*.c
-ALL_TOOLS = obj/musl-gcc
-TOOL_LIBS = lib/musl-gcc.specs
-ADD_CFI = yes
-MALLOC_DIR = mallocng
-SHARED_LIBS =
-WRAPCC_GCC = $(CC)
--include $(srcdir)/arch/$(ARCH)/arch.mak
-
-ifeq ($(ARCH),)
-
all:
- @echo "Please set ARCH in config.mak before running make."
- @exit 1
-
-else
-
-all: $(ALL_LIBS) $(ALL_TOOLS)
-
-OBJ_DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(GENH) $(GENH_INT))) obj/include)
-
-$(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(ALL_OBJS:%.o=%.lo) $(GENH) $(GENH_INT): | $(OBJ_DIRS)
-
-$(OBJ_DIRS):
- mkdir -p $@
-
-obj/include/bits/alltypes.h: $(srcdir)/arch/$(ARCH)/bits/alltypes.h.in $(srcdir)/include/alltypes.h.in $(srcdir)/tools/mkalltypes.sed
- sed -f $(srcdir)/tools/mkalltypes.sed $(srcdir)/arch/$(ARCH)/bits/alltypes.h.in $(srcdir)/include/alltypes.h.in > $@
-
-obj/include/bits/syscall.h: $(srcdir)/arch/$(ARCH)/bits/syscall.h.in
- cp $< $@
- sed -n -e s/__NR_/SYS_/p < $< >> $@
-
-obj/src/internal/version.h: $(wildcard $(srcdir)/VERSION $(srcdir)/.git)
- printf '#define VERSION "%s"\n' "$$(cd $(srcdir); sh tools/version.sh)" > $@
-
-obj/src/internal/version.o obj/src/internal/version.lo: obj/src/internal/version.h
-
-obj/crt/rcrt1.o obj/ldso/dlstart.lo obj/ldso/dynlink.lo: $(srcdir)/src/internal/dynlink.h $(srcdir)/arch/$(ARCH)/reloc.h
+include deps.mk
-obj/crt/crt1.o obj/crt/scrt1.o obj/crt/rcrt1.o obj/ldso/dlstart.lo: $(srcdir)/arch/$(ARCH)/crt_arch.h
+manpages = $(manpages.in:.in=)
+catalogs.cat = $(catalogs.msg:.msg=.cat)
-obj/crt/rcrt1.o: $(srcdir)/ldso/dlstart.c
+sources.o = $(sources.c:.c=.o) $(sources.s:.s=.o)
+sources.to = $(sources.c:.c=.to)
+sources.xa = $(sources.c:.c=.xa)
+# sources.bin = $(sources.c:.c=.bin) # FIXME
+fuzz.o = $(fuzz.c:.c=.o)
+fuzz.xa = $(fuzz.c:.c=.xa)
+fuzz.bin = $(fuzz.c:.c=.bin)
-obj/crt/Scrt1.o obj/crt/rcrt1.o: CFLAGS_ALL += -fPIC
+sources = \
+ $(sources.c) \
+ $(sources.c:.c=.h) \
+ src/config.h.in \
+ src/config.h \
+ src/main.c \
+ src/$(NAME).h \
+ $(catalogs.msg) \
-OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=$(srcdir)/src/%))
-$(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.o) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.lo): CFLAGS += -O3
+empty-libs.a = \
+ libm.a \
+ librt.a \
+ libpthread.a \
+ libcrypt.a \
+ libutil.a \
+ libxnet.a \
+ libresolv.a \
+ libdl.a \
-MEMOPS_OBJS = $(filter %/memcpy.o %/memmove.o %/memcmp.o %/memset.o, $(LIBC_OBJS))
-$(MEMOPS_OBJS) $(MEMOPS_OBJS:%.o=%.lo): CFLAGS_ALL += $(CFLAGS_MEMOPS)
-NOSSP_OBJS = $(CRT_OBJS) $(LDSO_OBJS) $(filter \
- %/__libc_start_main.o %/__init_tls.o %/__stack_chk_fail.o \
- %/__set_thread_area.o %/memset.o %/memcpy.o \
- , $(LIBC_OBJS))
-$(NOSSP_OBJS) $(NOSSP_OBJS:%.o=%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP)
+derived-assets = \
+ lib$(NAME).a \
+ $(empty-libs.a) \
+ libc.a \
+ src/config.h \
+ $(manpages) \
+ $(catalogs.cat) \
+ $(sources.o) \
+ $(sources.to) \
+ $(sources.xa) \
+ $(sources.bin) \
+ src/main.o \
+ src/main.xa \
+ src/main.bin \
-$(CRT_OBJS): CFLAGS_ALL += -DCRT
+side-assets = \
+ $(fuzz.o) \
+ $(fuzz.xa) \
+ $(fuzz.bin) \
-$(LOBJS) $(LDSO_OBJS): CFLAGS_ALL += -fPIC
-CC_CMD = $(CC) $(CFLAGS_ALL) -c -o $@ $<
-# Choose invocation of assembler to be used
-ifeq ($(ADD_CFI),yes)
- AS_CMD = LC_ALL=C awk -f $(srcdir)/tools/add-cfi.common.awk -f $(srcdir)/tools/add-cfi.$(ARCH).awk $< | $(CC) $(CFLAGS_ALL) -x assembler -c -o $@ -
-else
- AS_CMD = $(CC_CMD)
-endif
+## Default target. Builds all artifacts required for testing
+## and installation.
+all: $(derived-assets)
-obj/%.o: $(srcdir)/%.s
- $(AS_CMD)
-obj/%.o: $(srcdir)/%.S
- $(CC_CMD)
+lib$(NAME).a: $(libc.c:.c=.o) $(libc.s:.s=.o)
+src/main.xa: $(sources.o) src/main.o
+$(fuzz.bin): lib$(NAME).a
+$(manpages) src/config.h: Makefile deps.mk
+$(sources.o) $(sources.to): Makefile deps.mk src/config.h
-obj/%.o: $(srcdir)/%.c $(GENH) $(IMPH)
- $(CC_CMD)
-obj/%.lo: $(srcdir)/%.s
- $(AS_CMD)
+lib$(NAME).a $(sources.xa) src/main.xa $(fuzz.xa) $(empty-libs.a):
+ $(AR) $(ARFLAGS) $@ $?
-obj/%.lo: $(srcdir)/%.S
- $(CC_CMD)
+src/$(NAME).en.cat: src/i18n.bin
+ env DUMP_TRANSLATABLE_STRINGS=1 $(EXEC)src/i18n.bin > $*.msg.new
+ cmp -s $*.msg.new $*.msg || mv $*.msg.new $*.msg
+ rm -f $*.msg.new
+ gencat $@ $*.msg
+ touch $@
-obj/%.lo: $(srcdir)/%.c $(GENH) $(IMPH)
- $(CC_CMD)
+libc.a: lib$(NAME).a
+ ln -fs lib$(NAME).a $@
-lib/libc.so: $(LOBJS) $(LDSO_OBJS)
- $(CC) $(CFLAGS_ALL) $(LDFLAGS_ALL) -nostdlib -shared \
- -Wl,-e,_dlstart -o $@ $(LOBJS) $(LDSO_OBJS) $(LIBCC)
-lib/libc.a: $(AOBJS)
- rm -f $@
- $(AR) rc $@ $(AOBJS)
- $(RANLIB) $@
-$(EMPTY_LIBS):
- rm -f $@
- $(AR) rc $@
+src/catalog.bin-check: src/$(NAME).en.cat
-lib/%.o: obj/crt/$(ARCH)/%.o
- cp $< $@
-lib/%.o: obj/crt/%.o
- cp $< $@
+.SUFFIXES: .bin-check
+# sources.bin-check = $(sources.c:.c=.bin-check)
+$(sources.bin-check):
+ $(EXEC)$*.bin
-lib/musl-gcc.specs: $(srcdir)/tools/musl-gcc.specs.sh
- sh $< "$(includedir)" "$(libdir)" "$(LDSO_PATHNAME)" > $@
+check-unit: $(sources.bin-check)
-obj/musl-gcc:
- printf '#!/bin/sh\nexec "$${REALGCC:-$(WRAPCC_GCC)}" "$$@" -specs "%s/musl-gcc.specs"\n' "$(libdir)" > $@
- chmod +x $@
-obj/%-clang: $(srcdir)/tools/%-clang.in
- sed -e 's!@CC@!$(WRAPCC_CLANG)!g' -e 's!@PREFIX@!$(prefix)!g' -e 's!@INCDIR@!$(includedir)!g' -e 's!@LIBDIR@!$(libdir)!g' -e 's!@LDSO@!$(LDSO_PATHNAME)!g' $< > $@
- chmod +x $@
+## Run all tests. Each test suite is isolated, so that a parallel
+## build can run tests at the same time. The required artifacts
+## are created if missing.
+check: check-unit
-$(DESTDIR)$(bindir)/%: obj/%
- $(INSTALL) -D $< $@
-$(DESTDIR)$(libdir)/%.so: lib/%.so
- $(INSTALL) -D -m 755 $< $@
-$(DESTDIR)$(libdir)/%: lib/%
- $(INSTALL) -D -m 644 $< $@
+fuzz.bin-check = $(fuzz.c:.c=.bin-check)
+$(fuzz.bin-check):
+ $(EXEC)$*.bin tests/fuzz/corpus/ $(FUZZFLAGS)
-$(DESTDIR)$(includedir)/bits/%: $(srcdir)/arch/$(ARCH)/bits/%
- $(INSTALL) -D -m 644 $< $@
+## Run fuzzing targets indefinitely.
+fuzz: $(fuzz.bin-check)
-$(DESTDIR)$(includedir)/bits/%: $(srcdir)/arch/generic/bits/%
- $(INSTALL) -D -m 644 $< $@
-$(DESTDIR)$(includedir)/bits/%: obj/include/bits/%
- $(INSTALL) -D -m 644 $< $@
-
-$(DESTDIR)$(includedir)/%: $(srcdir)/include/%
- $(INSTALL) -D -m 644 $< $@
-
-$(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
- $(INSTALL) -D -l $(libdir)/libc.so $@ || true
-
-install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
-
-install-headers: $(ALL_INCLUDES:include/%=$(DESTDIR)$(includedir)/%)
-
-install-tools: $(ALL_TOOLS:obj/%=$(DESTDIR)$(bindir)/%)
-
-install: install-libs install-headers install-tools
-
-musl-git-%.tar.gz: .git
- git --git-dir=$(srcdir)/.git archive --format=tar.gz --prefix=$(patsubst %.tar.gz,%,$@)/ -o $@ $(patsubst musl-git-%.tar.gz,%,$@)
-
-musl-%.tar.gz: .git
- git --git-dir=$(srcdir)/.git archive --format=tar.gz --prefix=$(patsubst %.tar.gz,%,$@)/ -o $@ v$(patsubst musl-%.tar.gz,%,$@)
-
-endif
+## Remove *all* derived artifacts produced during the build.
+## A dedicated test asserts that this is always true.
clean:
- rm -rf obj lib
-
-distclean: clean
- rm -f config.mak
-
-.PHONY: all clean install install-libs install-headers install-tools
+ rm -rf $(derived-assets) $(side-assets)
+
+
+## Installs into $(DESTDIR)$(PREFIX). Its dependency target
+## ensures that all installable artifacts are crafted beforehand.
+install: all
+ mkdir -p \
+ '$(DESTDIR)$(BINDIR)' \
+ '$(DESTDIR)$(LIBDIR)' \
+ '$(DESTDIR)$(INCLUDEDIR)'
+ cp src/main.bin '$(DESTDIR)$(BINDIR)'/$(NAME)
+ # FIXME headers in '$(DESTDIR)$(INCLUDEDIR)'
+ cp -P lib$(NAME).a $(empty-libs.a) libc.a '$(DESTDIR)$(LIBDIR)'
+ for f in $(FIXME_sources); do \
+ dir='$(DESTDIR)$(SRCDIR)'/"`dirname "$${f#src/}"`"; \
+ mkdir -p "$$dir"; \
+ cp -P "$$f" "$$dir"; \
+ done
+ for l in $(LANGUAGES); do \
+ dir='$(DESTDIR)$(LOCALEDIR)'/"$$l"/LC_MESSAGES; \
+ mkdir -p "$$dir"; \
+ cp src/$(NAME)."$$l".cat "$$dir"/$(NAME).cat; \
+ done
+ sh tools/manpages.sh -ip '$(DESTDIR)$(MANDIR)' $(manpages)
+
+## Uninstalls from $(DESTDIR)$(PREFIX). This is a perfect mirror
+## of the "install" target, and removes *all* that was installed.
+## A dedicated test asserts that this is always true.
+uninstall:
+ rm -rf \
+ '$(DESTDIR)$(BINDIR)'/$(NAME) \
+ '$(DESTDIR)$(LIBDIR)'/lib$(NAME).a \
+ '$(DESTDIR)$(INCLUDEDIR)'/$(NAME).h \
+ '$(DESTDIR)$(SRCDIR)'
+ for l in $(empty-libs.a) libc.a; do \
+ rm -f '$(DESTDIR)$(LIBDIR)'/"$$l"; \
+ done
+ for l in $(LANGUAGES); do \
+ rm -f '$(DESTDIR)$(LOCALEDIR)'/"$$l"/LC_MESSAGES/$(NAME).cat; \
+ done
+ sh tools/manpages.sh -up '$(DESTDIR)$(MANDIR)' $(manpages)
+
+
+MAKEFILE = Makefile
+## Show this help.
+help:
+ cat $(MAKEFILE) | sh tools/makehelp.sh
+
+
+ALWAYS:
diff --git a/deps.mk b/deps.mk
new file mode 100644
index 00000000..5a916bcd
--- /dev/null
+++ b/deps.mk
@@ -0,0 +1,1951 @@
+manpages.en.in = \
+ doc/grovel.CHANGELOG.en.7.in \
+ doc/grovel.README.en.7.in \
+ doc/grovel.TODOs.en.7.in \
+ doc/grovel.en.1.in \
+ doc/grovel.recipe.en.7.in \
+ doc/grovel.tutorial.en.7.in \
+ doc/grovel.why.en.7.in \
+
+manpages.in = $(manpages.en.in)
+catalogs.en.msg =
+catalogs.msg = $(catalogs.en.msg)
+
+fuzz.c = \
+ tests/fuzz/another.c \
+ tests/fuzz/hello.c \
+
+tests/fuzz/another.xa: tests/fuzz/another.o
+tests/fuzz/hello.xa: tests/fuzz/hello.o
+tests/fuzz/another.bin-check: tests/fuzz/another.bin
+tests/fuzz/hello.bin-check: tests/fuzz/hello.bin
+
+## no x86_64, and has different extension
+#isources.S = \
+# src/fenv/arm/fenv-hf.S \
+# src/fenv/mips/fenv.S \
+# src/fenv/mips64/fenv.S \
+# src/fenv/mipsn32/fenv.S \
+# src/fenv/powerpc/fenv.S \
+# src/fenv/riscv64/fenv.S \
+# src/fenv/sh/fenv.S \
+# src/ldso/arm/dlsym_time64.S \
+# src/ldso/arm/tlsdesc.S \
+# src/ldso/i386/dlsym_time64.S \
+# src/ldso/m68k/dlsym_time64.S \
+# src/ldso/microblaze/dlsym_time64.S \
+# src/ldso/mips/dlsym_time64.S \
+# src/ldso/mipsn32/dlsym_time64.S \
+# src/ldso/or1k/dlsym_time64.S \
+# src/ldso/powerpc/dlsym_time64.S \
+# src/ldso/sh/dlsym_time64.S \
+# src/setjmp/arm/longjmp.S \
+# src/setjmp/arm/setjmp.S \
+# src/setjmp/mips/longjmp.S \
+# src/setjmp/mips/setjmp.S \
+# src/setjmp/mips64/longjmp.S \
+# src/setjmp/mips64/setjmp.S \
+# src/setjmp/mipsn32/longjmp.S \
+# src/setjmp/mipsn32/setjmp.S \
+# src/setjmp/powerpc/longjmp.S \
+# src/setjmp/powerpc/setjmp.S \
+# src/setjmp/riscv64/longjmp.S \
+# src/setjmp/riscv64/setjmp.S \
+# src/setjmp/sh/longjmp.S \
+# src/setjmp/sh/setjmp.S \
+# src/string/aarch64/memcpy.S \
+# src/string/aarch64/memset.S \
+# src/string/arm/memcpy.S \
+
+## $PLATFORM
+# src/fenv/s390x/fenv.c \
+# src/fenv/powerpc64/fenv.c \
+# src/math/aarch64/ceil.c \
+# src/math/aarch64/ceilf.c \
+# src/math/aarch64/fabs.c \
+# src/math/aarch64/fabsf.c \
+# src/math/aarch64/floor.c \
+# src/math/aarch64/floorf.c \
+# src/math/aarch64/fma.c \
+# src/math/aarch64/fmaf.c \
+# src/math/aarch64/fmax.c \
+# src/math/aarch64/fmaxf.c \
+# src/math/aarch64/fmin.c \
+# src/math/aarch64/fminf.c \
+# src/math/aarch64/llrint.c \
+# src/math/aarch64/llrintf.c \
+# src/math/aarch64/llround.c \
+# src/math/aarch64/llroundf.c \
+# src/math/aarch64/lrint.c \
+# src/math/aarch64/lrintf.c \
+# src/math/aarch64/lround.c \
+# src/math/aarch64/lroundf.c \
+# src/math/aarch64/nearbyint.c \
+# src/math/aarch64/nearbyintf.c \
+# src/math/aarch64/rint.c \
+# src/math/aarch64/rintf.c \
+# src/math/aarch64/round.c \
+# src/math/aarch64/roundf.c \
+# src/math/aarch64/sqrt.c \
+# src/math/aarch64/sqrtf.c \
+# src/math/aarch64/trunc.c \
+# src/math/aarch64/truncf.c \
+# src/math/arm/fabs.c \
+# src/math/arm/fabsf.c \
+# src/math/arm/fma.c \
+# src/math/arm/fmaf.c \
+# src/math/arm/sqrt.c \
+# src/math/arm/sqrtf.c \
+# src/fenv/arm/fenv.c \
+# src/fenv/m68k/fenv.c \
+# src/fenv/mips/fenv-sf.c \
+# src/fenv/mips64/fenv-sf.c \
+# src/fenv/mipsn32/fenv-sf.c \
+# src/fenv/powerpc/fenv-sf.c \
+# src/fenv/riscv64/fenv-sf.c \
+# src/fenv/sh/fenv-nofpu.c \
+# src/math/powerpc/fabs.c \
+# src/math/powerpc/fabsf.c \
+# src/math/powerpc/fma.c \
+# src/math/powerpc/fmaf.c \
+# src/math/powerpc/sqrt.c \
+# src/math/powerpc/sqrtf.c \
+# src/math/powerpc64/ceil.c \
+# src/math/powerpc64/ceilf.c \
+# src/math/powerpc64/fabs.c \
+# src/math/powerpc64/fabsf.c \
+# src/math/powerpc64/floor.c \
+# src/math/powerpc64/floorf.c \
+# src/math/powerpc64/fma.c \
+# src/math/powerpc64/fmaf.c \
+# src/math/powerpc64/fmax.c \
+# src/math/powerpc64/fmaxf.c \
+# src/math/powerpc64/fmin.c \
+# src/math/powerpc64/fminf.c \
+# src/math/powerpc64/lrint.c \
+# src/math/powerpc64/lrintf.c \
+# src/math/powerpc64/lround.c \
+# src/math/powerpc64/lroundf.c \
+# src/math/powerpc64/round.c \
+# src/math/powerpc64/roundf.c \
+# src/math/powerpc64/sqrt.c \
+# src/math/powerpc64/sqrtf.c \
+# src/math/powerpc64/trunc.c \
+# src/math/powerpc64/truncf.c \
+# src/math/s390x/ceil.c \
+# src/math/s390x/ceilf.c \
+# src/math/s390x/ceill.c \
+# src/math/s390x/fabs.c \
+# src/math/s390x/fabsf.c \
+# src/math/s390x/fabsl.c \
+# src/math/s390x/floor.c \
+# src/math/s390x/floorf.c \
+# src/math/s390x/floorl.c \
+# src/math/s390x/fma.c \
+# src/math/s390x/fmaf.c \
+# src/math/s390x/nearbyint.c \
+# src/math/s390x/nearbyintf.c \
+# src/math/s390x/nearbyintl.c \
+# src/math/s390x/rint.c \
+# src/math/s390x/rintf.c \
+# src/math/s390x/rintl.c \
+# src/math/s390x/round.c \
+# src/math/s390x/roundf.c \
+# src/math/s390x/roundl.c \
+# src/math/s390x/sqrt.c \
+# src/math/s390x/sqrtf.c \
+# src/math/s390x/sqrtl.c \
+# src/math/s390x/trunc.c \
+# src/math/s390x/truncf.c \
+# src/math/s390x/truncl.c \
+# src/thread/sh/__set_thread_area.c \
+# src/thread/sh/__unmapself.c \
+# src/unistd/mipsn32/lseek.c \
+# crt/crti.c \
+# crt/crtn.c \
+# src/exit/arm/__aeabi_atexit.c \
+# src/ldso/arm/find_exidx.c \
+# src/thread/arm/__set_thread_area.c \
+# src/math/riscv64/copysign.c \
+# src/math/riscv64/copysignf.c \
+# src/math/riscv64/fabs.c \
+# src/math/riscv64/fabsf.c \
+# src/math/riscv64/fma.c \
+# src/math/riscv64/fmaf.c \
+# src/math/riscv64/fmax.c \
+# src/math/riscv64/fmaxf.c \
+# src/math/riscv64/fmin.c \
+# src/math/riscv64/fminf.c \
+# src/math/riscv64/sqrt.c \
+# src/math/riscv64/sqrtf.c \
+# src/math/i386/fabs.c \
+# src/math/i386/fabsf.c \
+# src/math/i386/fabsl.c \
+# src/math/i386/fmod.c \
+# src/math/i386/fmodf.c \
+# src/math/i386/fmodl.c \
+# src/math/i386/llrint.c \
+# src/math/i386/llrintf.c \
+# src/math/i386/llrintl.c \
+# src/math/i386/lrint.c \
+# src/math/i386/lrintf.c \
+# src/math/i386/lrintl.c \
+# src/math/i386/remainder.c \
+# src/math/i386/remainderf.c \
+# src/math/i386/remainderl.c \
+# src/math/i386/rint.c \
+# src/math/i386/rintf.c \
+# src/math/i386/rintl.c \
+# src/math/i386/sqrt.c \
+# src/math/i386/sqrtf.c \
+# src/math/i386/sqrtl.c \
+# src/math/m68k/sqrtl.c \
+# src/math/mips/fabs.c \
+# src/math/mips/fabsf.c \
+# src/math/mips/sqrt.c \
+# src/math/mips/sqrtf.c \
+# src/math/x32/fma.c \
+# src/math/x32/fmaf.c \
+
+# src/signal/x32/getitimer.c \
+# src/signal/x32/setitimer.c \
+# src/unistd/x32/lseek.c \
+# src/internal/sh/__shcall.c \
+# src/linux/x32/sysinfo.c \
+
+## compat
+# compat/time32/__xstat.c \
+# compat/time32/adjtime32.c \
+# compat/time32/adjtimex_time32.c \
+# compat/time32/aio_suspend_time32.c \
+# compat/time32/clock_adjtime32.c \
+# compat/time32/clock_getres_time32.c \
+# compat/time32/clock_gettime32.c \
+# compat/time32/clock_nanosleep_time32.c \
+# compat/time32/clock_settime32.c \
+# compat/time32/cnd_timedwait_time32.c \
+# compat/time32/ctime32.c \
+# compat/time32/ctime32_r.c \
+# compat/time32/difftime32.c \
+# compat/time32/fstat_time32.c \
+# compat/time32/fstatat_time32.c \
+# compat/time32/ftime32.c \
+# compat/time32/futimens_time32.c \
+# compat/time32/futimes_time32.c \
+# compat/time32/futimesat_time32.c \
+# compat/time32/getitimer_time32.c \
+# compat/time32/getrusage_time32.c \
+# compat/time32/gettimeofday_time32.c \
+# compat/time32/gmtime32.c \
+# compat/time32/gmtime32_r.c \
+# compat/time32/localtime32.c \
+# compat/time32/localtime32_r.c \
+# compat/time32/lstat_time32.c \
+# compat/time32/lutimes_time32.c \
+# compat/time32/mktime32.c \
+# compat/time32/mq_timedreceive_time32.c \
+# compat/time32/mq_timedsend_time32.c \
+# compat/time32/mtx_timedlock_time32.c \
+# compat/time32/nanosleep_time32.c \
+# compat/time32/ppoll_time32.c \
+# compat/time32/pselect_time32.c \
+# compat/time32/pthread_cond_timedwait_time32.c \
+# compat/time32/pthread_mutex_timedlock_time32.c \
+# compat/time32/pthread_rwlock_timedrdlock_time32.c \
+# compat/time32/pthread_rwlock_timedwrlock_time32.c \
+# compat/time32/pthread_timedjoin_np_time32.c \
+# compat/time32/recvmmsg_time32.c \
+# compat/time32/sched_rr_get_interval_time32.c \
+# compat/time32/select_time32.c \
+# compat/time32/sem_timedwait_time32.c \
+# compat/time32/semtimedop_time32.c \
+# compat/time32/setitimer_time32.c \
+# compat/time32/settimeofday_time32.c \
+# compat/time32/sigtimedwait_time32.c \
+# compat/time32/stat_time32.c \
+# compat/time32/stime32.c \
+# compat/time32/thrd_sleep_time32.c \
+# compat/time32/time32.c \
+# compat/time32/time32gm.c \
+# compat/time32/timer_gettime32.c \
+# compat/time32/timer_settime32.c \
+# compat/time32/timerfd_gettime32.c \
+# compat/time32/timerfd_settime32.c \
+# compat/time32/timespec_get_time32.c \
+# compat/time32/utime_time32.c \
+# compat/time32/utimensat_time32.c \
+# compat/time32/utimes_time32.c \
+# compat/time32/wait3_time32.c \
+# compat/time32/wait4_time32.c \
+
+## crt
+# crt/crt1.c \
+
+## ldso
+# ldso/dlstart.c \
+# ldso/dynlink.c \
+
+## extra implementation
+# src/malloc/oldmalloc/aligned_alloc.c \
+# src/malloc/oldmalloc/malloc.c \
+# src/malloc/oldmalloc/malloc_usable_size.c \
+
+linux-fail.c = \
+ src/linux/adjtime.c \
+ src/linux/adjtimex.c \
+ src/linux/arch_prctl.c \
+ src/linux/brk.c \
+ src/linux/cache.c \
+ src/linux/cap.c \
+ src/linux/chroot.c \
+ src/linux/clock_adjtime.c \
+ src/linux/clone.c \
+ src/linux/copy_file_range.c \
+ src/linux/epoll.c \
+ src/linux/eventfd.c \
+ src/linux/fallocate.c \
+ src/linux/fanotify.c \
+ src/linux/flock.c \
+ src/linux/getdents.c \
+ src/linux/getrandom.c \
+ src/linux/gettid.c \
+ src/linux/inotify.c \
+ src/linux/ioperm.c \
+ src/linux/iopl.c \
+ src/linux/klogctl.c \
+ src/linux/membarrier.c \
+ src/linux/memfd_create.c \
+ src/linux/mlock2.c \
+ src/linux/module.c \
+ src/linux/mount.c \
+ src/linux/name_to_handle_at.c \
+ src/linux/open_by_handle_at.c \
+ src/linux/personality.c \
+ src/linux/pivot_root.c \
+ src/linux/ppoll.c \
+ src/linux/prctl.c \
+ src/linux/prlimit.c \
+ src/linux/process_vm.c \
+ src/linux/ptrace.c \
+ src/linux/quotactl.c \
+ src/linux/readahead.c \
+ src/linux/reboot.c \
+ src/linux/remap_file_pages.c \
+ src/linux/sbrk.c \
+ src/linux/sendfile.c \
+ src/linux/setfsgid.c \
+ src/linux/setfsuid.c \
+ src/linux/setgroups.c \
+ src/linux/sethostname.c \
+ src/linux/setns.c \
+ src/linux/settimeofday.c \
+ src/linux/signalfd.c \
+ src/linux/splice.c \
+ src/linux/stime.c \
+ src/linux/swap.c \
+ src/linux/sync_file_range.c \
+ src/linux/syncfs.c \
+ src/linux/sysinfo.c \
+ src/linux/tee.c \
+ src/linux/timerfd.c \
+ src/linux/unshare.c \
+ src/linux/utimes.c \
+ src/linux/vhangup.c \
+ src/linux/vmsplice.c \
+ src/linux/wait3.c \
+ src/linux/wait4.c \
+ src/linux/xattr.c \
+
+## crt
+# crt/Scrt1.c \
+# crt/rcrt1.c \
+
+optimized.c = \
+ src/math/x86_64/fabs.c \
+ src/math/x86_64/fabsf.c \
+ src/math/x86_64/fabsl.c \
+ src/math/x86_64/fma.c \
+ src/math/x86_64/fmaf.c \
+ src/math/x86_64/fmodl.c \
+ src/math/x86_64/llrint.c \
+ src/math/x86_64/llrintf.c \
+ src/math/x86_64/llrintl.c \
+ src/math/x86_64/lrint.c \
+ src/math/x86_64/lrintf.c \
+ src/math/x86_64/lrintl.c \
+ src/math/x86_64/remainderl.c \
+ src/math/x86_64/remquol.c \
+ src/math/x86_64/rintl.c \
+ src/math/x86_64/sqrt.c \
+ src/math/x86_64/sqrtf.c \
+ src/math/x86_64/sqrtl.c \
+
+## generic
+# src/math/acosl.c \
+# src/math/asinl.c \
+# src/math/atan2l.c \
+# src/math/atanl.c \
+# src/math/ceill.c \
+# src/math/exp2l.c \
+# src/math/expl.c \
+# src/math/expm1l.c \
+# src/math/floorl.c \
+# src/math/log10l.c \
+# src/math/log1pl.c \
+# src/math/log2l.c \
+# src/math/logl.c \
+# src/math/truncl.c \
+# src/process/vfork.c \
+# src/string/memcpy.c \
+# src/string/memmove.c \
+# src/string/memset.c \
+# src/signal/restore.c \
+# src/thread/__set_thread_area.c \
+# src/thread/__unmapself.c \
+# src/thread/clone.c \
+# src/ldso/tlsdesc.c \
+# src/fenv/fenv.c \
+# src/math/__invtrigl.c \
+# src/ldso/dlsym.c \
+# src/math/fabs.c \
+# src/math/fabsf.c \
+# src/math/fabsl.c \
+# src/math/fma.c \
+# src/math/fmaf.c \
+# src/math/fmodl.c \
+# src/math/llrint.c \
+# src/math/llrintf.c \
+# src/math/llrintl.c \
+# src/math/lrint.c \
+# src/math/lrintf.c \
+# src/math/lrintl.c \
+# src/math/remainderl.c \
+# src/math/remquol.c \
+# src/math/rintl.c \
+# src/math/sqrt.c \
+# src/math/sqrtf.c \
+# src/math/sqrtl.c \
+
+libc.c = \
+ src/aio/aio.c \
+ src/aio/aio_suspend.c \
+ src/aio/lio_listio.c \
+ src/complex/__cexp.c \
+ src/complex/__cexpf.c \
+ src/complex/cabs.c \
+ src/complex/cabsf.c \
+ src/complex/cabsl.c \
+ src/complex/cacos.c \
+ src/complex/cacosf.c \
+ src/complex/cacosh.c \
+ src/complex/cacoshf.c \
+ src/complex/cacoshl.c \
+ src/complex/cacosl.c \
+ src/complex/carg.c \
+ src/complex/cargf.c \
+ src/complex/cargl.c \
+ src/complex/casin.c \
+ src/complex/casinf.c \
+ src/complex/casinh.c \
+ src/complex/casinhf.c \
+ src/complex/casinhl.c \
+ src/complex/casinl.c \
+ src/complex/catan.c \
+ src/complex/catanf.c \
+ src/complex/catanh.c \
+ src/complex/catanhf.c \
+ src/complex/catanhl.c \
+ src/complex/catanl.c \
+ src/complex/ccos.c \
+ src/complex/ccosf.c \
+ src/complex/ccosh.c \
+ src/complex/ccoshf.c \
+ src/complex/ccoshl.c \
+ src/complex/ccosl.c \
+ src/complex/cexp.c \
+ src/complex/cexpf.c \
+ src/complex/cexpl.c \
+ src/complex/cimag.c \
+ src/complex/cimagf.c \
+ src/complex/cimagl.c \
+ src/complex/clog.c \
+ src/complex/clogf.c \
+ src/complex/clogl.c \
+ src/complex/conj.c \
+ src/complex/conjf.c \
+ src/complex/conjl.c \
+ src/complex/cpow.c \
+ src/complex/cpowf.c \
+ src/complex/cpowl.c \
+ src/complex/cproj.c \
+ src/complex/cprojf.c \
+ src/complex/cprojl.c \
+ src/complex/creal.c \
+ src/complex/crealf.c \
+ src/complex/creall.c \
+ src/complex/csin.c \
+ src/complex/csinf.c \
+ src/complex/csinh.c \
+ src/complex/csinhf.c \
+ src/complex/csinhl.c \
+ src/complex/csinl.c \
+ src/complex/csqrt.c \
+ src/complex/csqrtf.c \
+ src/complex/csqrtl.c \
+ src/complex/ctan.c \
+ src/complex/ctanf.c \
+ src/complex/ctanh.c \
+ src/complex/ctanhf.c \
+ src/complex/ctanhl.c \
+ src/complex/ctanl.c \
+ src/conf/confstr.c \
+ src/conf/fpathconf.c \
+ src/conf/legacy.c \
+ src/conf/pathconf.c \
+ src/conf/sysconf.c \
+ src/crypt/crypt.c \
+ src/crypt/crypt_blowfish.c \
+ src/crypt/crypt_des.c \
+ src/crypt/crypt_md5.c \
+ src/crypt/crypt_r.c \
+ src/crypt/crypt_sha256.c \
+ src/crypt/crypt_sha512.c \
+ src/crypt/encrypt.c \
+ src/ctype/__ctype_b_loc.c \
+ src/ctype/__ctype_get_mb_cur_max.c \
+ src/ctype/__ctype_tolower_loc.c \
+ src/ctype/__ctype_toupper_loc.c \
+ src/ctype/isalnum.c \
+ src/ctype/isalpha.c \
+ src/ctype/isascii.c \
+ src/ctype/isblank.c \
+ src/ctype/iscntrl.c \
+ src/ctype/isdigit.c \
+ src/ctype/isgraph.c \
+ src/ctype/islower.c \
+ src/ctype/isprint.c \
+ src/ctype/ispunct.c \
+ src/ctype/isspace.c \
+ src/ctype/isupper.c \
+ src/ctype/iswalnum.c \
+ src/ctype/iswalpha.c \
+ src/ctype/iswblank.c \
+ src/ctype/iswcntrl.c \
+ src/ctype/iswctype.c \
+ src/ctype/iswdigit.c \
+ src/ctype/iswgraph.c \
+ src/ctype/iswlower.c \
+ src/ctype/iswprint.c \
+ src/ctype/iswpunct.c \
+ src/ctype/iswspace.c \
+ src/ctype/iswupper.c \
+ src/ctype/iswxdigit.c \
+ src/ctype/isxdigit.c \
+ src/ctype/toascii.c \
+ src/ctype/tolower.c \
+ src/ctype/toupper.c \
+ src/ctype/towctrans.c \
+ src/ctype/wcswidth.c \
+ src/ctype/wctrans.c \
+ src/ctype/wcwidth.c \
+ src/dirent/alphasort.c \
+ src/dirent/closedir.c \
+ src/dirent/dirfd.c \
+ src/dirent/fdopendir.c \
+ src/dirent/opendir.c \
+ src/dirent/readdir.c \
+ src/dirent/readdir_r.c \
+ src/dirent/rewinddir.c \
+ src/dirent/scandir.c \
+ src/dirent/seekdir.c \
+ src/dirent/telldir.c \
+ src/dirent/versionsort.c \
+ src/env/__environ.c \
+ src/env/__init_tls.c \
+ src/env/__libc_start_main.c \
+ src/env/__reset_tls.c \
+ src/env/__stack_chk_fail.c \
+ src/env/clearenv.c \
+ src/env/getenv.c \
+ src/env/putenv.c \
+ src/env/secure_getenv.c \
+ src/env/setenv.c \
+ src/env/unsetenv.c \
+ src/errno/__errno_location.c \
+ src/errno/strerror.c \
+ src/exit/_Exit.c \
+ src/exit/abort.c \
+ src/exit/abort_lock.c \
+ src/exit/assert.c \
+ src/exit/at_quick_exit.c \
+ src/exit/atexit.c \
+ src/exit/exit.c \
+ src/exit/quick_exit.c \
+ src/fcntl/creat.c \
+ src/fcntl/fcntl.c \
+ src/fcntl/open.c \
+ src/fcntl/openat.c \
+ src/fcntl/posix_fadvise.c \
+ src/fcntl/posix_fallocate.c \
+ src/fenv/__flt_rounds.c \
+ src/fenv/fegetexceptflag.c \
+ src/fenv/feholdexcept.c \
+ src/fenv/fesetexceptflag.c \
+ src/fenv/fesetround.c \
+ src/fenv/feupdateenv.c \
+ src/internal/defsysinfo.c \
+ src/internal/floatscan.c \
+ src/internal/intscan.c \
+ src/internal/libc.c \
+ src/internal/procfdname.c \
+ src/internal/shgetc.c \
+ src/internal/syscall_ret.c \
+ src/internal/vdso.c \
+ src/internal/version.c \
+ src/ipc/ftok.c \
+ src/ipc/msgctl.c \
+ src/ipc/msgget.c \
+ src/ipc/msgrcv.c \
+ src/ipc/msgsnd.c \
+ src/ipc/semctl.c \
+ src/ipc/semget.c \
+ src/ipc/semop.c \
+ src/ipc/semtimedop.c \
+ src/ipc/shmat.c \
+ src/ipc/shmctl.c \
+ src/ipc/shmdt.c \
+ src/ipc/shmget.c \
+ src/ldso/__dlsym.c \
+ src/ldso/dl_iterate_phdr.c \
+ src/ldso/dladdr.c \
+ src/ldso/dlclose.c \
+ src/ldso/dlerror.c \
+ src/ldso/dlinfo.c \
+ src/ldso/dlopen.c \
+ src/legacy/cuserid.c \
+ src/legacy/daemon.c \
+ src/legacy/err.c \
+ src/legacy/euidaccess.c \
+ src/legacy/ftw.c \
+ src/legacy/futimes.c \
+ src/legacy/getdtablesize.c \
+ src/legacy/getloadavg.c \
+ src/legacy/getpagesize.c \
+ src/legacy/getpass.c \
+ src/legacy/getusershell.c \
+ src/legacy/isastream.c \
+ src/legacy/lutimes.c \
+ src/legacy/ulimit.c \
+ src/legacy/utmpx.c \
+ src/legacy/valloc.c \
+ $(linux-fail.c) \
+ src/locale/__lctrans.c \
+ src/locale/__mo_lookup.c \
+ src/locale/bind_textdomain_codeset.c \
+ src/locale/c_locale.c \
+ src/locale/catclose.c \
+ src/locale/catgets.c \
+ src/locale/catopen.c \
+ src/locale/dcngettext.c \
+ src/locale/duplocale.c \
+ src/locale/freelocale.c \
+ src/locale/iconv.c \
+ src/locale/iconv_close.c \
+ src/locale/langinfo.c \
+ src/locale/locale_map.c \
+ src/locale/localeconv.c \
+ src/locale/newlocale.c \
+ src/locale/pleval.c \
+ src/locale/setlocale.c \
+ src/locale/strcoll.c \
+ src/locale/strfmon.c \
+ src/locale/strtod_l.c \
+ src/locale/strxfrm.c \
+ src/locale/textdomain.c \
+ src/locale/uselocale.c \
+ src/locale/wcscoll.c \
+ src/locale/wcsxfrm.c \
+ src/malloc/calloc.c \
+ src/malloc/free.c \
+ src/malloc/libc_calloc.c \
+ src/malloc/lite_malloc.c \
+ src/malloc/mallocng/aligned_alloc.c \
+ src/malloc/mallocng/donate.c \
+ src/malloc/mallocng/free.c \
+ src/malloc/mallocng/malloc.c \
+ src/malloc/mallocng/malloc_usable_size.c \
+ src/malloc/mallocng/realloc.c \
+ src/malloc/memalign.c \
+ src/malloc/posix_memalign.c \
+ src/malloc/realloc.c \
+ src/malloc/reallocarray.c \
+ src/malloc/replaced.c \
+ src/math/__cos.c \
+ src/math/__cosdf.c \
+ src/math/__cosl.c \
+ src/math/__expo2.c \
+ src/math/__expo2f.c \
+ src/math/__fpclassify.c \
+ src/math/__fpclassifyf.c \
+ src/math/__fpclassifyl.c \
+ src/math/__math_divzero.c \
+ src/math/__math_divzerof.c \
+ src/math/__math_invalid.c \
+ src/math/__math_invalidf.c \
+ src/math/__math_invalidl.c \
+ src/math/__math_oflow.c \
+ src/math/__math_oflowf.c \
+ src/math/__math_uflow.c \
+ src/math/__math_uflowf.c \
+ src/math/__math_xflow.c \
+ src/math/__math_xflowf.c \
+ src/math/__polevll.c \
+ src/math/__rem_pio2.c \
+ src/math/__rem_pio2_large.c \
+ src/math/__rem_pio2f.c \
+ src/math/__rem_pio2l.c \
+ src/math/__signbit.c \
+ src/math/__signbitf.c \
+ src/math/__signbitl.c \
+ src/math/__sin.c \
+ src/math/__sindf.c \
+ src/math/__sinl.c \
+ src/math/__tan.c \
+ src/math/__tandf.c \
+ src/math/__tanl.c \
+ src/math/acos.c \
+ src/math/acosf.c \
+ src/math/acosh.c \
+ src/math/acoshf.c \
+ src/math/acoshl.c \
+ src/math/asin.c \
+ src/math/asinf.c \
+ src/math/asinh.c \
+ src/math/asinhf.c \
+ src/math/asinhl.c \
+ src/math/atan.c \
+ src/math/atan2.c \
+ src/math/atan2f.c \
+ src/math/atanf.c \
+ src/math/atanh.c \
+ src/math/atanhf.c \
+ src/math/atanhl.c \
+ src/math/cbrt.c \
+ src/math/cbrtf.c \
+ src/math/cbrtl.c \
+ src/math/ceil.c \
+ src/math/ceilf.c \
+ src/math/copysign.c \
+ src/math/copysignf.c \
+ src/math/copysignl.c \
+ src/math/cos.c \
+ src/math/cosf.c \
+ src/math/cosh.c \
+ src/math/coshf.c \
+ src/math/coshl.c \
+ src/math/cosl.c \
+ src/math/erf.c \
+ src/math/erff.c \
+ src/math/erfl.c \
+ src/math/exp.c \
+ src/math/exp10.c \
+ src/math/exp10f.c \
+ src/math/exp10l.c \
+ src/math/exp2.c \
+ src/math/exp2f.c \
+ src/math/exp2f_data.c \
+ src/math/exp_data.c \
+ src/math/expf.c \
+ src/math/expm1.c \
+ src/math/expm1f.c \
+ src/math/fdim.c \
+ src/math/fdimf.c \
+ src/math/fdiml.c \
+ src/math/finite.c \
+ src/math/finitef.c \
+ src/math/floor.c \
+ src/math/floorf.c \
+ src/math/fmal.c \
+ src/math/fmax.c \
+ src/math/fmaxf.c \
+ src/math/fmaxl.c \
+ src/math/fmin.c \
+ src/math/fminf.c \
+ src/math/fminl.c \
+ src/math/fmod.c \
+ src/math/fmodf.c \
+ src/math/frexp.c \
+ src/math/frexpf.c \
+ src/math/frexpl.c \
+ src/math/hypot.c \
+ src/math/hypotf.c \
+ src/math/hypotl.c \
+ src/math/ilogb.c \
+ src/math/ilogbf.c \
+ src/math/ilogbl.c \
+ src/math/j0.c \
+ src/math/j0f.c \
+ src/math/j1.c \
+ src/math/j1f.c \
+ src/math/jn.c \
+ src/math/jnf.c \
+ src/math/ldexp.c \
+ src/math/ldexpf.c \
+ src/math/ldexpl.c \
+ src/math/lgamma.c \
+ src/math/lgamma_r.c \
+ src/math/lgammaf.c \
+ src/math/lgammaf_r.c \
+ src/math/lgammal.c \
+ src/math/llround.c \
+ src/math/llroundf.c \
+ src/math/llroundl.c \
+ src/math/log.c \
+ src/math/log10.c \
+ src/math/log10f.c \
+ src/math/log1p.c \
+ src/math/log1pf.c \
+ src/math/log2.c \
+ src/math/log2_data.c \
+ src/math/log2f.c \
+ src/math/log2f_data.c \
+ src/math/log_data.c \
+ src/math/logb.c \
+ src/math/logbf.c \
+ src/math/logbl.c \
+ src/math/logf.c \
+ src/math/logf_data.c \
+ src/math/lround.c \
+ src/math/lroundf.c \
+ src/math/lroundl.c \
+ src/math/modf.c \
+ src/math/modff.c \
+ src/math/modfl.c \
+ src/math/nan.c \
+ src/math/nanf.c \
+ src/math/nanl.c \
+ src/math/nearbyint.c \
+ src/math/nearbyintf.c \
+ src/math/nearbyintl.c \
+ src/math/nextafter.c \
+ src/math/nextafterf.c \
+ src/math/nextafterl.c \
+ src/math/nexttoward.c \
+ src/math/nexttowardf.c \
+ src/math/nexttowardl.c \
+ src/math/pow.c \
+ src/math/pow_data.c \
+ src/math/powf.c \
+ src/math/powf_data.c \
+ src/math/powl.c \
+ src/math/remainder.c \
+ src/math/remainderf.c \
+ src/math/remquo.c \
+ src/math/remquof.c \
+ src/math/rint.c \
+ src/math/rintf.c \
+ src/math/round.c \
+ src/math/roundf.c \
+ src/math/roundl.c \
+ src/math/scalb.c \
+ src/math/scalbf.c \
+ src/math/scalbln.c \
+ src/math/scalblnf.c \
+ src/math/scalblnl.c \
+ src/math/scalbn.c \
+ src/math/scalbnf.c \
+ src/math/scalbnl.c \
+ src/math/signgam.c \
+ src/math/significand.c \
+ src/math/significandf.c \
+ src/math/sin.c \
+ src/math/sincos.c \
+ src/math/sincosf.c \
+ src/math/sincosl.c \
+ src/math/sinf.c \
+ src/math/sinh.c \
+ src/math/sinhf.c \
+ src/math/sinhl.c \
+ src/math/sinl.c \
+ src/math/sqrt_data.c \
+ src/math/tan.c \
+ src/math/tanf.c \
+ src/math/tanh.c \
+ src/math/tanhf.c \
+ src/math/tanhl.c \
+ src/math/tanl.c \
+ src/math/tgamma.c \
+ src/math/tgammaf.c \
+ src/math/tgammal.c \
+ src/math/trunc.c \
+ src/math/truncf.c \
+ $(optimized.c) \
+ src/misc/a64l.c \
+ src/misc/basename.c \
+ src/misc/dirname.c \
+ src/misc/ffs.c \
+ src/misc/ffsl.c \
+ src/misc/ffsll.c \
+ src/misc/fmtmsg.c \
+ src/misc/forkpty.c \
+ src/misc/get_current_dir_name.c \
+ src/misc/getauxval.c \
+ src/misc/getdomainname.c \
+ src/misc/getentropy.c \
+ src/misc/gethostid.c \
+ src/misc/getopt.c \
+ src/misc/getopt_long.c \
+ src/misc/getpriority.c \
+ src/misc/getresgid.c \
+ src/misc/getresuid.c \
+ src/misc/getrlimit.c \
+ src/misc/getrusage.c \
+ src/misc/getsubopt.c \
+ src/misc/initgroups.c \
+ src/misc/ioctl.c \
+ src/misc/issetugid.c \
+ src/misc/lockf.c \
+ src/misc/login_tty.c \
+ src/misc/mntent.c \
+ src/misc/nftw.c \
+ src/misc/openpty.c \
+ src/misc/ptsname.c \
+ src/misc/pty.c \
+ src/misc/realpath.c \
+ src/misc/setdomainname.c \
+ src/misc/setpriority.c \
+ src/misc/setrlimit.c \
+ src/misc/syscall.c \
+ src/misc/syslog.c \
+ src/misc/uname.c \
+ src/misc/wordexp.c \
+ src/mman/madvise.c \
+ src/mman/mincore.c \
+ src/mman/mlock.c \
+ src/mman/mlockall.c \
+ src/mman/mmap.c \
+ src/mman/mprotect.c \
+ src/mman/mremap.c \
+ src/mman/msync.c \
+ src/mman/munlock.c \
+ src/mman/munlockall.c \
+ src/mman/munmap.c \
+ src/mman/posix_madvise.c \
+ src/mman/shm_open.c \
+ src/mq/mq_close.c \
+ src/mq/mq_getattr.c \
+ src/mq/mq_notify.c \
+ src/mq/mq_open.c \
+ src/mq/mq_receive.c \
+ src/mq/mq_send.c \
+ src/mq/mq_setattr.c \
+ src/mq/mq_timedreceive.c \
+ src/mq/mq_timedsend.c \
+ src/mq/mq_unlink.c \
+ src/multibyte/btowc.c \
+ src/multibyte/c16rtomb.c \
+ src/multibyte/c32rtomb.c \
+ src/multibyte/internal.c \
+ src/multibyte/mblen.c \
+ src/multibyte/mbrlen.c \
+ src/multibyte/mbrtoc16.c \
+ src/multibyte/mbrtoc32.c \
+ src/multibyte/mbrtowc.c \
+ src/multibyte/mbsinit.c \
+ src/multibyte/mbsnrtowcs.c \
+ src/multibyte/mbsrtowcs.c \
+ src/multibyte/mbstowcs.c \
+ src/multibyte/mbtowc.c \
+ src/multibyte/wcrtomb.c \
+ src/multibyte/wcsnrtombs.c \
+ src/multibyte/wcsrtombs.c \
+ src/multibyte/wcstombs.c \
+ src/multibyte/wctob.c \
+ src/multibyte/wctomb.c \
+ src/network/accept.c \
+ src/network/accept4.c \
+ src/network/bind.c \
+ src/network/connect.c \
+ src/network/dn_comp.c \
+ src/network/dn_expand.c \
+ src/network/dn_skipname.c \
+ src/network/dns_parse.c \
+ src/network/ent.c \
+ src/network/ether.c \
+ src/network/freeaddrinfo.c \
+ src/network/gai_strerror.c \
+ src/network/getaddrinfo.c \
+ src/network/gethostbyaddr.c \
+ src/network/gethostbyaddr_r.c \
+ src/network/gethostbyname.c \
+ src/network/gethostbyname2.c \
+ src/network/gethostbyname2_r.c \
+ src/network/gethostbyname_r.c \
+ src/network/getifaddrs.c \
+ src/network/getnameinfo.c \
+ src/network/getpeername.c \
+ src/network/getservbyname.c \
+ src/network/getservbyname_r.c \
+ src/network/getservbyport.c \
+ src/network/getservbyport_r.c \
+ src/network/getsockname.c \
+ src/network/getsockopt.c \
+ src/network/h_errno.c \
+ src/network/herror.c \
+ src/network/hstrerror.c \
+ src/network/htonl.c \
+ src/network/htons.c \
+ src/network/if_freenameindex.c \
+ src/network/if_indextoname.c \
+ src/network/if_nameindex.c \
+ src/network/if_nametoindex.c \
+ src/network/in6addr_any.c \
+ src/network/in6addr_loopback.c \
+ src/network/inet_addr.c \
+ src/network/inet_aton.c \
+ src/network/inet_legacy.c \
+ src/network/inet_ntoa.c \
+ src/network/inet_ntop.c \
+ src/network/inet_pton.c \
+ src/network/listen.c \
+ src/network/lookup_ipliteral.c \
+ src/network/lookup_name.c \
+ src/network/lookup_serv.c \
+ src/network/netlink.c \
+ src/network/netname.c \
+ src/network/ns_parse.c \
+ src/network/ntohl.c \
+ src/network/ntohs.c \
+ src/network/proto.c \
+ src/network/recv.c \
+ src/network/recvfrom.c \
+ src/network/recvmmsg.c \
+ src/network/recvmsg.c \
+ src/network/res_init.c \
+ src/network/res_mkquery.c \
+ src/network/res_msend.c \
+ src/network/res_query.c \
+ src/network/res_querydomain.c \
+ src/network/res_send.c \
+ src/network/res_state.c \
+ src/network/resolvconf.c \
+ src/network/send.c \
+ src/network/sendmmsg.c \
+ src/network/sendmsg.c \
+ src/network/sendto.c \
+ src/network/serv.c \
+ src/network/setsockopt.c \
+ src/network/shutdown.c \
+ src/network/sockatmark.c \
+ src/network/socket.c \
+ src/network/socketpair.c \
+ src/passwd/fgetgrent.c \
+ src/passwd/fgetpwent.c \
+ src/passwd/fgetspent.c \
+ src/passwd/getgr_a.c \
+ src/passwd/getgr_r.c \
+ src/passwd/getgrent.c \
+ src/passwd/getgrent_a.c \
+ src/passwd/getgrouplist.c \
+ src/passwd/getpw_a.c \
+ src/passwd/getpw_r.c \
+ src/passwd/getpwent.c \
+ src/passwd/getpwent_a.c \
+ src/passwd/getspent.c \
+ src/passwd/getspnam.c \
+ src/passwd/getspnam_r.c \
+ src/passwd/lckpwdf.c \
+ src/passwd/nscd_query.c \
+ src/passwd/putgrent.c \
+ src/passwd/putpwent.c \
+ src/passwd/putspent.c \
+ src/prng/__rand48_step.c \
+ src/prng/__seed48.c \
+ src/prng/drand48.c \
+ src/prng/lcong48.c \
+ src/prng/lrand48.c \
+ src/prng/mrand48.c \
+ src/prng/rand.c \
+ src/prng/rand_r.c \
+ src/prng/random.c \
+ src/prng/seed48.c \
+ src/prng/srand48.c \
+ src/process/_Fork.c \
+ src/process/execl.c \
+ src/process/execle.c \
+ src/process/execlp.c \
+ src/process/execv.c \
+ src/process/execve.c \
+ src/process/execvp.c \
+ src/process/fexecve.c \
+ src/process/fork.c \
+ src/process/posix_spawn.c \
+ src/process/posix_spawn_file_actions_addchdir.c \
+ src/process/posix_spawn_file_actions_addclose.c \
+ src/process/posix_spawn_file_actions_adddup2.c \
+ src/process/posix_spawn_file_actions_addfchdir.c \
+ src/process/posix_spawn_file_actions_addopen.c \
+ src/process/posix_spawn_file_actions_destroy.c \
+ src/process/posix_spawn_file_actions_init.c \
+ src/process/posix_spawnattr_destroy.c \
+ src/process/posix_spawnattr_getflags.c \
+ src/process/posix_spawnattr_getpgroup.c \
+ src/process/posix_spawnattr_getsigdefault.c \
+ src/process/posix_spawnattr_getsigmask.c \
+ src/process/posix_spawnattr_init.c \
+ src/process/posix_spawnattr_sched.c \
+ src/process/posix_spawnattr_setflags.c \
+ src/process/posix_spawnattr_setpgroup.c \
+ src/process/posix_spawnattr_setsigdefault.c \
+ src/process/posix_spawnattr_setsigmask.c \
+ src/process/posix_spawnp.c \
+ src/process/system.c \
+ src/process/wait.c \
+ src/process/waitid.c \
+ src/process/waitpid.c \
+ src/regex/fnmatch.c \
+ src/regex/glob.c \
+ src/regex/regcomp.c \
+ src/regex/regerror.c \
+ src/regex/regexec.c \
+ src/regex/tre-mem.c \
+ src/sched/affinity.c \
+ src/sched/sched_cpucount.c \
+ src/sched/sched_get_priority_max.c \
+ src/sched/sched_getcpu.c \
+ src/sched/sched_getparam.c \
+ src/sched/sched_getscheduler.c \
+ src/sched/sched_rr_get_interval.c \
+ src/sched/sched_setparam.c \
+ src/sched/sched_setscheduler.c \
+ src/sched/sched_yield.c \
+ src/search/hsearch.c \
+ src/search/insque.c \
+ src/search/lsearch.c \
+ src/search/tdelete.c \
+ src/search/tdestroy.c \
+ src/search/tfind.c \
+ src/search/tsearch.c \
+ src/search/twalk.c \
+ src/select/poll.c \
+ src/select/pselect.c \
+ src/select/select.c \
+ src/signal/block.c \
+ src/signal/getitimer.c \
+ src/signal/kill.c \
+ src/signal/killpg.c \
+ src/signal/psiginfo.c \
+ src/signal/psignal.c \
+ src/signal/raise.c \
+ src/signal/setitimer.c \
+ src/signal/sigaction.c \
+ src/signal/sigaddset.c \
+ src/signal/sigaltstack.c \
+ src/signal/sigandset.c \
+ src/signal/sigdelset.c \
+ src/signal/sigemptyset.c \
+ src/signal/sigfillset.c \
+ src/signal/sighold.c \
+ src/signal/sigignore.c \
+ src/signal/siginterrupt.c \
+ src/signal/sigisemptyset.c \
+ src/signal/sigismember.c \
+ src/signal/siglongjmp.c \
+ src/signal/signal.c \
+ src/signal/sigorset.c \
+ src/signal/sigpause.c \
+ src/signal/sigpending.c \
+ src/signal/sigprocmask.c \
+ src/signal/sigqueue.c \
+ src/signal/sigrelse.c \
+ src/signal/sigrtmax.c \
+ src/signal/sigrtmin.c \
+ src/signal/sigset.c \
+ src/signal/sigsetjmp_tail.c \
+ src/signal/sigsuspend.c \
+ src/signal/sigtimedwait.c \
+ src/signal/sigwait.c \
+ src/signal/sigwaitinfo.c \
+ src/stat/__xstat.c \
+ src/stat/chmod.c \
+ src/stat/fchmod.c \
+ src/stat/fchmodat.c \
+ src/stat/fstat.c \
+ src/stat/fstatat.c \
+ src/stat/futimens.c \
+ src/stat/futimesat.c \
+ src/stat/lchmod.c \
+ src/stat/lstat.c \
+ src/stat/mkdir.c \
+ src/stat/mkdirat.c \
+ src/stat/mkfifo.c \
+ src/stat/mkfifoat.c \
+ src/stat/mknod.c \
+ src/stat/mknodat.c \
+ src/stat/stat.c \
+ src/stat/statvfs.c \
+ src/stat/umask.c \
+ src/stat/utimensat.c \
+ src/stdio/__fclose_ca.c \
+ src/stdio/__fdopen.c \
+ src/stdio/__fmodeflags.c \
+ src/stdio/__fopen_rb_ca.c \
+ src/stdio/__lockfile.c \
+ src/stdio/__overflow.c \
+ src/stdio/__stdio_close.c \
+ src/stdio/__stdio_exit.c \
+ src/stdio/__stdio_read.c \
+ src/stdio/__stdio_seek.c \
+ src/stdio/__stdio_write.c \
+ src/stdio/__stdout_write.c \
+ src/stdio/__toread.c \
+ src/stdio/__towrite.c \
+ src/stdio/__uflow.c \
+ src/stdio/asprintf.c \
+ src/stdio/clearerr.c \
+ src/stdio/dprintf.c \
+ src/stdio/ext.c \
+ src/stdio/ext2.c \
+ src/stdio/fclose.c \
+ src/stdio/feof.c \
+ src/stdio/ferror.c \
+ src/stdio/fflush.c \
+ src/stdio/fgetc.c \
+ src/stdio/fgetln.c \
+ src/stdio/fgetpos.c \
+ src/stdio/fgets.c \
+ src/stdio/fgetwc.c \
+ src/stdio/fgetws.c \
+ src/stdio/fileno.c \
+ src/stdio/flockfile.c \
+ src/stdio/fmemopen.c \
+ src/stdio/fopen.c \
+ src/stdio/fopencookie.c \
+ src/stdio/fprintf.c \
+ src/stdio/fputc.c \
+ src/stdio/fputs.c \
+ src/stdio/fputwc.c \
+ src/stdio/fputws.c \
+ src/stdio/fread.c \
+ src/stdio/freopen.c \
+ src/stdio/fscanf.c \
+ src/stdio/fseek.c \
+ src/stdio/fsetpos.c \
+ src/stdio/ftell.c \
+ src/stdio/ftrylockfile.c \
+ src/stdio/funlockfile.c \
+ src/stdio/fwide.c \
+ src/stdio/fwprintf.c \
+ src/stdio/fwrite.c \
+ src/stdio/fwscanf.c \
+ src/stdio/getc.c \
+ src/stdio/getc_unlocked.c \
+ src/stdio/getchar.c \
+ src/stdio/getchar_unlocked.c \
+ src/stdio/getdelim.c \
+ src/stdio/getline.c \
+ src/stdio/gets.c \
+ src/stdio/getw.c \
+ src/stdio/getwc.c \
+ src/stdio/getwchar.c \
+ src/stdio/ofl.c \
+ src/stdio/ofl_add.c \
+ src/stdio/open_memstream.c \
+ src/stdio/open_wmemstream.c \
+ src/stdio/pclose.c \
+ src/stdio/perror.c \
+ src/stdio/popen.c \
+ src/stdio/printf.c \
+ src/stdio/putc.c \
+ src/stdio/putc_unlocked.c \
+ src/stdio/putchar.c \
+ src/stdio/putchar_unlocked.c \
+ src/stdio/puts.c \
+ src/stdio/putw.c \
+ src/stdio/putwc.c \
+ src/stdio/putwchar.c \
+ src/stdio/remove.c \
+ src/stdio/rename.c \
+ src/stdio/rewind.c \
+ src/stdio/scanf.c \
+ src/stdio/setbuf.c \
+ src/stdio/setbuffer.c \
+ src/stdio/setlinebuf.c \
+ src/stdio/setvbuf.c \
+ src/stdio/snprintf.c \
+ src/stdio/sprintf.c \
+ src/stdio/sscanf.c \
+ src/stdio/stderr.c \
+ src/stdio/stdin.c \
+ src/stdio/stdout.c \
+ src/stdio/swprintf.c \
+ src/stdio/swscanf.c \
+ src/stdio/tempnam.c \
+ src/stdio/tmpfile.c \
+ src/stdio/tmpnam.c \
+ src/stdio/ungetc.c \
+ src/stdio/ungetwc.c \
+ src/stdio/vasprintf.c \
+ src/stdio/vdprintf.c \
+ src/stdio/vfprintf.c \
+ src/stdio/vfscanf.c \
+ src/stdio/vfwprintf.c \
+ src/stdio/vfwscanf.c \
+ src/stdio/vprintf.c \
+ src/stdio/vscanf.c \
+ src/stdio/vsnprintf.c \
+ src/stdio/vsprintf.c \
+ src/stdio/vsscanf.c \
+ src/stdio/vswprintf.c \
+ src/stdio/vswscanf.c \
+ src/stdio/vwprintf.c \
+ src/stdio/vwscanf.c \
+ src/stdio/wprintf.c \
+ src/stdio/wscanf.c \
+ src/stdlib/abs.c \
+ src/stdlib/atof.c \
+ src/stdlib/atoi.c \
+ src/stdlib/atol.c \
+ src/stdlib/atoll.c \
+ src/stdlib/bsearch.c \
+ src/stdlib/div.c \
+ src/stdlib/ecvt.c \
+ src/stdlib/fcvt.c \
+ src/stdlib/gcvt.c \
+ src/stdlib/imaxabs.c \
+ src/stdlib/imaxdiv.c \
+ src/stdlib/labs.c \
+ src/stdlib/ldiv.c \
+ src/stdlib/llabs.c \
+ src/stdlib/lldiv.c \
+ src/stdlib/qsort.c \
+ src/stdlib/qsort_nr.c \
+ src/stdlib/strtod.c \
+ src/stdlib/strtol.c \
+ src/stdlib/wcstod.c \
+ src/stdlib/wcstol.c \
+ src/string/bcmp.c \
+ src/string/bcopy.c \
+ src/string/bzero.c \
+ src/string/explicit_bzero.c \
+ src/string/index.c \
+ src/string/memccpy.c \
+ src/string/memchr.c \
+ src/string/memcmp.c \
+ src/string/memmem.c \
+ src/string/mempcpy.c \
+ src/string/memrchr.c \
+ src/string/rindex.c \
+ src/string/stpcpy.c \
+ src/string/stpncpy.c \
+ src/string/strcasecmp.c \
+ src/string/strcasestr.c \
+ src/string/strcat.c \
+ src/string/strchr.c \
+ src/string/strchrnul.c \
+ src/string/strcmp.c \
+ src/string/strcpy.c \
+ src/string/strcspn.c \
+ src/string/strdup.c \
+ src/string/strerror_r.c \
+ src/string/strlcat.c \
+ src/string/strlcpy.c \
+ src/string/strlen.c \
+ src/string/strncasecmp.c \
+ src/string/strncat.c \
+ src/string/strncmp.c \
+ src/string/strncpy.c \
+ src/string/strndup.c \
+ src/string/strnlen.c \
+ src/string/strpbrk.c \
+ src/string/strrchr.c \
+ src/string/strsep.c \
+ src/string/strsignal.c \
+ src/string/strspn.c \
+ src/string/strstr.c \
+ src/string/strtok.c \
+ src/string/strtok_r.c \
+ src/string/strverscmp.c \
+ src/string/swab.c \
+ src/string/wcpcpy.c \
+ src/string/wcpncpy.c \
+ src/string/wcscasecmp.c \
+ src/string/wcscasecmp_l.c \
+ src/string/wcscat.c \
+ src/string/wcschr.c \
+ src/string/wcscmp.c \
+ src/string/wcscpy.c \
+ src/string/wcscspn.c \
+ src/string/wcsdup.c \
+ src/string/wcslen.c \
+ src/string/wcsncasecmp.c \
+ src/string/wcsncasecmp_l.c \
+ src/string/wcsncat.c \
+ src/string/wcsncmp.c \
+ src/string/wcsncpy.c \
+ src/string/wcsnlen.c \
+ src/string/wcspbrk.c \
+ src/string/wcsrchr.c \
+ src/string/wcsspn.c \
+ src/string/wcsstr.c \
+ src/string/wcstok.c \
+ src/string/wcswcs.c \
+ src/string/wmemchr.c \
+ src/string/wmemcmp.c \
+ src/string/wmemcpy.c \
+ src/string/wmemmove.c \
+ src/string/wmemset.c \
+ src/temp/__randname.c \
+ src/temp/mkdtemp.c \
+ src/temp/mkostemp.c \
+ src/temp/mkostemps.c \
+ src/temp/mkstemp.c \
+ src/temp/mkstemps.c \
+ src/temp/mktemp.c \
+ src/termios/cfgetospeed.c \
+ src/termios/cfmakeraw.c \
+ src/termios/cfsetospeed.c \
+ src/termios/tcdrain.c \
+ src/termios/tcflow.c \
+ src/termios/tcflush.c \
+ src/termios/tcgetattr.c \
+ src/termios/tcgetsid.c \
+ src/termios/tcgetwinsize.c \
+ src/termios/tcsendbreak.c \
+ src/termios/tcsetattr.c \
+ src/termios/tcsetwinsize.c \
+ src/thread/__lock.c \
+ src/thread/__syscall_cp.c \
+ src/thread/__timedwait.c \
+ src/thread/__tls_get_addr.c \
+ src/thread/__wait.c \
+ src/thread/call_once.c \
+ src/thread/cnd_broadcast.c \
+ src/thread/cnd_destroy.c \
+ src/thread/cnd_init.c \
+ src/thread/cnd_signal.c \
+ src/thread/cnd_timedwait.c \
+ src/thread/cnd_wait.c \
+ src/thread/default_attr.c \
+ src/thread/lock_ptc.c \
+ src/thread/mtx_destroy.c \
+ src/thread/mtx_init.c \
+ src/thread/mtx_lock.c \
+ src/thread/mtx_timedlock.c \
+ src/thread/mtx_trylock.c \
+ src/thread/mtx_unlock.c \
+ src/thread/pthread_atfork.c \
+ src/thread/pthread_attr_destroy.c \
+ src/thread/pthread_attr_get.c \
+ src/thread/pthread_attr_init.c \
+ src/thread/pthread_attr_setdetachstate.c \
+ src/thread/pthread_attr_setguardsize.c \
+ src/thread/pthread_attr_setinheritsched.c \
+ src/thread/pthread_attr_setschedparam.c \
+ src/thread/pthread_attr_setschedpolicy.c \
+ src/thread/pthread_attr_setscope.c \
+ src/thread/pthread_attr_setstack.c \
+ src/thread/pthread_attr_setstacksize.c \
+ src/thread/pthread_barrier_destroy.c \
+ src/thread/pthread_barrier_init.c \
+ src/thread/pthread_barrier_wait.c \
+ src/thread/pthread_barrierattr_destroy.c \
+ src/thread/pthread_barrierattr_init.c \
+ src/thread/pthread_barrierattr_setpshared.c \
+ src/thread/pthread_cancel.c \
+ src/thread/pthread_cleanup_push.c \
+ src/thread/pthread_cond_broadcast.c \
+ src/thread/pthread_cond_destroy.c \
+ src/thread/pthread_cond_init.c \
+ src/thread/pthread_cond_signal.c \
+ src/thread/pthread_cond_timedwait.c \
+ src/thread/pthread_cond_wait.c \
+ src/thread/pthread_condattr_destroy.c \
+ src/thread/pthread_condattr_init.c \
+ src/thread/pthread_condattr_setclock.c \
+ src/thread/pthread_condattr_setpshared.c \
+ src/thread/pthread_create.c \
+ src/thread/pthread_detach.c \
+ src/thread/pthread_equal.c \
+ src/thread/pthread_getattr_np.c \
+ src/thread/pthread_getconcurrency.c \
+ src/thread/pthread_getcpuclockid.c \
+ src/thread/pthread_getname_np.c \
+ src/thread/pthread_getschedparam.c \
+ src/thread/pthread_getspecific.c \
+ src/thread/pthread_join.c \
+ src/thread/pthread_key_create.c \
+ src/thread/pthread_kill.c \
+ src/thread/pthread_mutex_consistent.c \
+ src/thread/pthread_mutex_destroy.c \
+ src/thread/pthread_mutex_getprioceiling.c \
+ src/thread/pthread_mutex_init.c \
+ src/thread/pthread_mutex_lock.c \
+ src/thread/pthread_mutex_setprioceiling.c \
+ src/thread/pthread_mutex_timedlock.c \
+ src/thread/pthread_mutex_trylock.c \
+ src/thread/pthread_mutex_unlock.c \
+ src/thread/pthread_mutexattr_destroy.c \
+ src/thread/pthread_mutexattr_init.c \
+ src/thread/pthread_mutexattr_setprotocol.c \
+ src/thread/pthread_mutexattr_setpshared.c \
+ src/thread/pthread_mutexattr_setrobust.c \
+ src/thread/pthread_mutexattr_settype.c \
+ src/thread/pthread_once.c \
+ src/thread/pthread_rwlock_destroy.c \
+ src/thread/pthread_rwlock_init.c \
+ src/thread/pthread_rwlock_rdlock.c \
+ src/thread/pthread_rwlock_timedrdlock.c \
+ src/thread/pthread_rwlock_timedwrlock.c \
+ src/thread/pthread_rwlock_tryrdlock.c \
+ src/thread/pthread_rwlock_trywrlock.c \
+ src/thread/pthread_rwlock_unlock.c \
+ src/thread/pthread_rwlock_wrlock.c \
+ src/thread/pthread_rwlockattr_destroy.c \
+ src/thread/pthread_rwlockattr_init.c \
+ src/thread/pthread_rwlockattr_setpshared.c \
+ src/thread/pthread_self.c \
+ src/thread/pthread_setattr_default_np.c \
+ src/thread/pthread_setcancelstate.c \
+ src/thread/pthread_setcanceltype.c \
+ src/thread/pthread_setconcurrency.c \
+ src/thread/pthread_setname_np.c \
+ src/thread/pthread_setschedparam.c \
+ src/thread/pthread_setschedprio.c \
+ src/thread/pthread_setspecific.c \
+ src/thread/pthread_sigmask.c \
+ src/thread/pthread_spin_destroy.c \
+ src/thread/pthread_spin_init.c \
+ src/thread/pthread_spin_lock.c \
+ src/thread/pthread_spin_trylock.c \
+ src/thread/pthread_spin_unlock.c \
+ src/thread/pthread_testcancel.c \
+ src/thread/sem_destroy.c \
+ src/thread/sem_getvalue.c \
+ src/thread/sem_init.c \
+ src/thread/sem_open.c \
+ src/thread/sem_post.c \
+ src/thread/sem_timedwait.c \
+ src/thread/sem_trywait.c \
+ src/thread/sem_unlink.c \
+ src/thread/sem_wait.c \
+ src/thread/synccall.c \
+ src/thread/thrd_create.c \
+ src/thread/thrd_exit.c \
+ src/thread/thrd_join.c \
+ src/thread/thrd_sleep.c \
+ src/thread/thrd_yield.c \
+ src/thread/tls.c \
+ src/thread/tss_create.c \
+ src/thread/tss_delete.c \
+ src/thread/tss_set.c \
+ src/thread/vmlock.c \
+ src/time/__map_file.c \
+ src/time/__month_to_secs.c \
+ src/time/__secs_to_tm.c \
+ src/time/__tm_to_secs.c \
+ src/time/__tz.c \
+ src/time/__year_to_secs.c \
+ src/time/asctime.c \
+ src/time/asctime_r.c \
+ src/time/clock.c \
+ src/time/clock_getcpuclockid.c \
+ src/time/clock_getres.c \
+ src/time/clock_gettime.c \
+ src/time/clock_nanosleep.c \
+ src/time/clock_settime.c \
+ src/time/ctime.c \
+ src/time/ctime_r.c \
+ src/time/difftime.c \
+ src/time/ftime.c \
+ src/time/getdate.c \
+ src/time/gettimeofday.c \
+ src/time/gmtime.c \
+ src/time/gmtime_r.c \
+ src/time/localtime.c \
+ src/time/localtime_r.c \
+ src/time/mktime.c \
+ src/time/nanosleep.c \
+ src/time/strftime.c \
+ src/time/strptime.c \
+ src/time/time.c \
+ src/time/timegm.c \
+ src/time/timer_create.c \
+ src/time/timer_delete.c \
+ src/time/timer_getoverrun.c \
+ src/time/timer_gettime.c \
+ src/time/timer_settime.c \
+ src/time/times.c \
+ src/time/timespec_get.c \
+ src/time/utime.c \
+ src/time/wcsftime.c \
+ src/unistd/_exit.c \
+ src/unistd/access.c \
+ src/unistd/acct.c \
+ src/unistd/alarm.c \
+ src/unistd/chdir.c \
+ src/unistd/chown.c \
+ src/unistd/close.c \
+ src/unistd/ctermid.c \
+ src/unistd/dup.c \
+ src/unistd/dup2.c \
+ src/unistd/dup3.c \
+ src/unistd/faccessat.c \
+ src/unistd/fchdir.c \
+ src/unistd/fchown.c \
+ src/unistd/fchownat.c \
+ src/unistd/fdatasync.c \
+ src/unistd/fsync.c \
+ src/unistd/ftruncate.c \
+ src/unistd/getcwd.c \
+ src/unistd/getegid.c \
+ src/unistd/geteuid.c \
+ src/unistd/getgid.c \
+ src/unistd/getgroups.c \
+ src/unistd/gethostname.c \
+ src/unistd/getlogin.c \
+ src/unistd/getlogin_r.c \
+ src/unistd/getpgid.c \
+ src/unistd/getpgrp.c \
+ src/unistd/getpid.c \
+ src/unistd/getppid.c \
+ src/unistd/getsid.c \
+ src/unistd/getuid.c \
+ src/unistd/isatty.c \
+ src/unistd/lchown.c \
+ src/unistd/link.c \
+ src/unistd/linkat.c \
+ src/unistd/lseek.c \
+ src/unistd/nice.c \
+ src/unistd/pause.c \
+ src/unistd/pipe.c \
+ src/unistd/pipe2.c \
+ src/unistd/posix_close.c \
+ src/unistd/pread.c \
+ src/unistd/preadv.c \
+ src/unistd/pwrite.c \
+ src/unistd/pwritev.c \
+ src/unistd/read.c \
+ src/unistd/readlink.c \
+ src/unistd/readlinkat.c \
+ src/unistd/readv.c \
+ src/unistd/renameat.c \
+ src/unistd/rmdir.c \
+ src/unistd/setegid.c \
+ src/unistd/seteuid.c \
+ src/unistd/setgid.c \
+ src/unistd/setpgid.c \
+ src/unistd/setpgrp.c \
+ src/unistd/setregid.c \
+ src/unistd/setresgid.c \
+ src/unistd/setresuid.c \
+ src/unistd/setreuid.c \
+ src/unistd/setsid.c \
+ src/unistd/setuid.c \
+ src/unistd/setxid.c \
+ src/unistd/sleep.c \
+ src/unistd/symlink.c \
+ src/unistd/symlinkat.c \
+ src/unistd/sync.c \
+ src/unistd/tcgetpgrp.c \
+ src/unistd/tcsetpgrp.c \
+ src/unistd/truncate.c \
+ src/unistd/ttyname.c \
+ src/unistd/ttyname_r.c \
+ src/unistd/ualarm.c \
+ src/unistd/unlink.c \
+ src/unistd/unlinkat.c \
+ src/unistd/usleep.c \
+ src/unistd/write.c \
+ src/unistd/writev.c \
+
+## $PLATFORM
+# crt/aarch64/crti.s \
+# crt/aarch64/crtn.s \
+# crt/arm/crti.s \
+# crt/arm/crtn.s \
+# crt/i386/crti.s \
+# crt/i386/crtn.s \
+# crt/microblaze/crti.s \
+# crt/microblaze/crtn.s \
+# crt/mips/crti.s \
+# crt/mips/crtn.s \
+# crt/mips64/crti.s \
+# crt/mips64/crtn.s \
+# crt/mipsn32/crti.s \
+# crt/mipsn32/crtn.s \
+# crt/or1k/crti.s \
+# crt/or1k/crtn.s \
+# crt/powerpc/crti.s \
+# crt/powerpc/crtn.s \
+# crt/powerpc64/crti.s \
+# crt/powerpc64/crtn.s \
+# crt/s390x/crti.s \
+# crt/s390x/crtn.s \
+# crt/sh/crti.s \
+# crt/sh/crtn.s \
+# crt/x32/crti.s \
+# crt/x32/crtn.s \
+# src/fenv/aarch64/fenv.s \
+# src/fenv/i386/fenv.s \
+# src/fenv/x32/fenv.s \
+# src/internal/i386/defsysinfo.s \
+# src/ldso/aarch64/dlsym.s \
+# src/ldso/aarch64/tlsdesc.s \
+# src/ldso/arm/dlsym.s \
+# src/ldso/i386/dlsym.s \
+# src/ldso/i386/tlsdesc.s \
+# src/ldso/m68k/dlsym.s \
+# src/ldso/microblaze/dlsym.s \
+# src/ldso/mips/dlsym.s \
+# src/ldso/mips64/dlsym.s \
+# src/ldso/mipsn32/dlsym.s \
+# src/ldso/or1k/dlsym.s \
+# src/ldso/powerpc/dlsym.s \
+# src/ldso/powerpc64/dlsym.s \
+# src/ldso/riscv64/dlsym.s \
+# src/ldso/s390x/dlsym.s \
+# src/ldso/sh/dlsym.s \
+# src/ldso/x32/dlsym.s \
+# src/math/i386/__invtrigl.s \
+# src/math/i386/acos.s \
+# src/math/i386/acosf.s \
+# src/math/i386/acosl.s \
+# src/math/i386/asin.s \
+# src/math/i386/asinf.s \
+# src/math/i386/asinl.s \
+# src/math/i386/atan.s \
+# src/math/i386/atan2.s \
+# src/math/i386/atan2f.s \
+# src/math/i386/atan2l.s \
+# src/math/i386/atanf.s \
+# src/math/i386/atanl.s \
+# src/math/i386/ceil.s \
+# src/math/i386/ceilf.s \
+# src/math/i386/ceill.s \
+# src/math/i386/exp2l.s \
+# src/math/i386/exp_ld.s \
+# src/math/i386/expl.s \
+# src/math/i386/expm1l.s \
+# src/math/i386/floor.s \
+# src/math/i386/floorf.s \
+# src/math/i386/floorl.s \
+# src/math/i386/hypot.s \
+# src/math/i386/hypotf.s \
+# src/math/i386/ldexp.s \
+# src/math/i386/ldexpf.s \
+# src/math/i386/ldexpl.s \
+# src/math/i386/log.s \
+# src/math/i386/log10.s \
+# src/math/i386/log10f.s \
+# src/math/i386/log10l.s \
+# src/math/i386/log1p.s \
+# src/math/i386/log1pf.s \
+# src/math/i386/log1pl.s \
+# src/math/i386/log2.s \
+# src/math/i386/log2f.s \
+# src/math/i386/log2l.s \
+# src/math/i386/logf.s \
+# src/math/i386/logl.s \
+# src/math/i386/remquo.s \
+# src/math/i386/remquof.s \
+# src/math/i386/remquol.s \
+# src/math/i386/scalbln.s \
+# src/math/i386/scalblnf.s \
+# src/math/i386/scalblnl.s \
+# src/math/i386/scalbn.s \
+# src/math/i386/scalbnf.s \
+# src/math/i386/scalbnl.s \
+# src/math/i386/trunc.s \
+# src/math/i386/truncf.s \
+# src/math/i386/truncl.s \
+# src/math/x32/__invtrigl.s \
+# src/math/x32/acosl.s \
+# src/math/x32/asinl.s \
+# src/math/x32/atan2l.s \
+# src/math/x32/atanl.s \
+# src/math/x32/ceill.s \
+# src/math/x32/exp2l.s \
+# src/math/x32/expl.s \
+# src/math/x32/expm1l.s \
+# src/math/x32/fabs.s \
+# src/math/x32/fabsf.s \
+# src/math/x32/fabsl.s \
+# src/math/x32/floorl.s \
+# src/math/x32/fmodl.s \
+# src/math/x32/llrint.s \
+# src/math/x32/llrintf.s \
+# src/math/x32/llrintl.s \
+# src/math/x32/log10l.s \
+# src/math/x32/log1pl.s \
+# src/math/x32/log2l.s \
+# src/math/x32/logl.s \
+# src/math/x32/lrint.s \
+# src/math/x32/lrintf.s \
+# src/math/x32/lrintl.s \
+# src/math/x32/remainderl.s \
+# src/math/x32/rintl.s \
+# src/math/x32/sqrt.s \
+# src/math/x32/sqrtf.s \
+# src/math/x32/sqrtl.s \
+# src/math/x32/truncl.s \
+# src/process/aarch64/vfork.s \
+# src/process/arm/vfork.s \
+# src/process/i386/vfork.s \
+# src/process/riscv64/vfork.s \
+# src/process/s390x/vfork.s \
+# src/process/sh/vfork.s \
+# src/process/x32/vfork.s \
+# src/setjmp/aarch64/longjmp.s \
+# src/setjmp/aarch64/setjmp.s \
+# src/setjmp/i386/longjmp.s \
+# src/setjmp/i386/setjmp.s \
+# src/setjmp/m68k/longjmp.s \
+# src/setjmp/m68k/setjmp.s \
+# src/setjmp/microblaze/longjmp.s \
+# src/setjmp/microblaze/setjmp.s \
+# src/setjmp/or1k/longjmp.s \
+# src/setjmp/or1k/setjmp.s \
+# src/setjmp/powerpc64/longjmp.s \
+# src/setjmp/powerpc64/setjmp.s \
+# src/setjmp/s390x/longjmp.s \
+# src/setjmp/s390x/setjmp.s \
+# src/setjmp/x32/longjmp.s \
+# src/setjmp/x32/setjmp.s \
+# src/signal/aarch64/restore.s \
+# src/signal/aarch64/sigsetjmp.s \
+# src/signal/arm/restore.s \
+# src/signal/arm/sigsetjmp.s \
+# src/signal/i386/restore.s \
+# src/signal/i386/sigsetjmp.s \
+# src/signal/m68k/sigsetjmp.s \
+# src/signal/microblaze/restore.s \
+# src/signal/microblaze/sigsetjmp.s \
+# src/signal/mips/sigsetjmp.s \
+# src/signal/mips64/sigsetjmp.s \
+# src/signal/mipsn32/sigsetjmp.s \
+# src/signal/or1k/sigsetjmp.s \
+# src/signal/powerpc/restore.s \
+# src/signal/powerpc/sigsetjmp.s \
+# src/signal/powerpc64/restore.s \
+# src/signal/powerpc64/sigsetjmp.s \
+# src/signal/riscv64/restore.s \
+# src/signal/riscv64/sigsetjmp.s \
+# src/signal/s390x/restore.s \
+# src/signal/s390x/sigsetjmp.s \
+# src/signal/sh/restore.s \
+# src/signal/sh/sigsetjmp.s \
+# src/signal/x32/restore.s \
+# src/signal/x32/sigsetjmp.s \
+# src/string/arm/__aeabi_memcpy.s \
+# src/string/arm/__aeabi_memset.s \
+# src/string/i386/memcpy.s \
+# src/string/i386/memmove.s \
+# src/string/i386/memset.s \
+# src/thread/aarch64/__set_thread_area.s \
+# src/thread/aarch64/__unmapself.s \
+# src/thread/aarch64/clone.s \
+# src/thread/aarch64/syscall_cp.s \
+# src/thread/arm/__aeabi_read_tp.s \
+# src/thread/arm/__unmapself.s \
+# src/thread/arm/atomics.s \
+# src/thread/arm/clone.s \
+# src/thread/arm/syscall_cp.s \
+# src/thread/i386/__set_thread_area.s \
+# src/thread/i386/__unmapself.s \
+# src/thread/i386/clone.s \
+# src/thread/i386/syscall_cp.s \
+# src/thread/i386/tls.s \
+# src/thread/m68k/__m68k_read_tp.s \
+# src/thread/m68k/clone.s \
+# src/thread/m68k/syscall_cp.s \
+# src/thread/microblaze/__set_thread_area.s \
+# src/thread/microblaze/__unmapself.s \
+# src/thread/microblaze/clone.s \
+# src/thread/microblaze/syscall_cp.s \
+# src/thread/mips/__unmapself.s \
+# src/thread/mips/clone.s \
+# src/thread/mips/syscall_cp.s \
+# src/thread/mips64/__unmapself.s \
+# src/thread/mips64/clone.s \
+# src/thread/mips64/syscall_cp.s \
+# src/thread/mipsn32/__unmapself.s \
+# src/thread/mipsn32/clone.s \
+# src/thread/mipsn32/syscall_cp.s \
+# src/thread/or1k/__set_thread_area.s \
+# src/thread/or1k/__unmapself.s \
+# src/thread/or1k/clone.s \
+# src/thread/or1k/syscall_cp.s \
+# src/thread/powerpc/__set_thread_area.s \
+# src/thread/powerpc/__unmapself.s \
+# src/thread/powerpc/clone.s \
+# src/thread/powerpc/syscall_cp.s \
+# src/thread/powerpc64/__set_thread_area.s \
+# src/thread/powerpc64/__unmapself.s \
+# src/thread/powerpc64/clone.s \
+# src/thread/powerpc64/syscall_cp.s \
+# src/thread/riscv64/__set_thread_area.s \
+# src/thread/riscv64/__unmapself.s \
+# src/thread/riscv64/clone.s \
+# src/thread/riscv64/syscall_cp.s \
+# src/thread/s390x/__set_thread_area.s \
+# src/thread/s390x/__tls_get_offset.s \
+# src/thread/s390x/__unmapself.s \
+# src/thread/s390x/clone.s \
+# src/thread/s390x/syscall_cp.s \
+# src/thread/sh/__unmapself_mmu.s \
+# src/thread/sh/atomics.s \
+# src/thread/sh/clone.s \
+# src/thread/sh/syscall_cp.s \
+# src/thread/x32/__set_thread_area.s \
+# src/thread/x32/__unmapself.s \
+# src/thread/x32/clone.s \
+# src/thread/x32/syscall_cp.s \
+# src/unistd/mips/pipe.s \
+# src/unistd/mips64/pipe.s \
+# src/unistd/mipsn32/pipe.s \
+# src/unistd/sh/pipe.s \
+
+## optimization
+optimized.s = \
+ src/fenv/x86_64/fenv.s \
+ src/ldso/x86_64/dlsym.s \
+ src/ldso/x86_64/tlsdesc.s \
+ src/math/x86_64/__invtrigl.s \
+ src/math/x86_64/acosl.s \
+ src/math/x86_64/asinl.s \
+ src/math/x86_64/atan2l.s \
+ src/math/x86_64/atanl.s \
+ src/math/x86_64/ceill.s \
+ src/math/x86_64/exp2l.s \
+ src/math/x86_64/expl.s \
+ src/math/x86_64/expm1l.s \
+ src/math/x86_64/floorl.s \
+ src/math/x86_64/log10l.s \
+ src/math/x86_64/log1pl.s \
+ src/math/x86_64/log2l.s \
+ src/math/x86_64/logl.s \
+ src/math/x86_64/truncl.s \
+ src/process/x86_64/vfork.s \
+ src/string/x86_64/memcpy.s \
+ src/string/x86_64/memmove.s \
+ src/string/x86_64/memset.s \
+ src/signal/x86_64/restore.s \
+ src/thread/x86_64/__set_thread_area.s \
+ src/thread/x86_64/__unmapself.s \
+ src/thread/x86_64/clone.s \
+
+libc.s = \
+ $(optimized.s) \
+ src/setjmp/x86_64/longjmp.s \
+ src/setjmp/x86_64/setjmp.s \
+ src/signal/x86_64/sigsetjmp.s \
+ src/thread/x86_64/syscall_cp.s \
+
+crt.c = crt/crt1.c
+crt.s = \
+ crt/x86_64/crti.s \
+ crt/x86_64/crtn.s \
+
+sources.c = $(libc.c) $(crt.c)
+sources.s = $(libc.s) $(crt.s)
diff --git a/crt/crti.c b/doc/grovel.CHANGELOG.en.7.in
index e69de29b..e69de29b 100644
--- a/crt/crti.c
+++ b/doc/grovel.CHANGELOG.en.7.in
diff --git a/crt/crtn.c b/doc/grovel.README.en.7.in
index e69de29b..e69de29b 100644
--- a/crt/crtn.c
+++ b/doc/grovel.README.en.7.in
diff --git a/src/setjmp/longjmp.c b/doc/grovel.TODOs.en.7.in
index e69de29b..e69de29b 100644
--- a/src/setjmp/longjmp.c
+++ b/doc/grovel.TODOs.en.7.in
diff --git a/src/setjmp/setjmp.c b/doc/grovel.en.1.in
index e69de29b..e69de29b 100644
--- a/src/setjmp/setjmp.c
+++ b/doc/grovel.en.1.in
diff --git a/src/signal/sigsetjmp.c b/doc/grovel.recipe.en.7.in
index e69de29b..e69de29b 100644
--- a/src/signal/sigsetjmp.c
+++ b/doc/grovel.recipe.en.7.in
diff --git a/src/thread/syscall_cp.c b/doc/grovel.tutorial.en.7.in
index e69de29b..e69de29b 100644
--- a/src/thread/syscall_cp.c
+++ b/doc/grovel.tutorial.en.7.in
diff --git a/doc/grovel.why.en.7.in b/doc/grovel.why.en.7.in
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/doc/grovel.why.en.7.in
diff --git a/f.c b/f.c
new file mode 100644
index 00000000..cdea8b36
--- /dev/null
+++ b/f.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+#include <string.h>
+
+int
+main(void) {
+ printf("strlen(\"\"): %d\n", strlen(""));
+ printf("sizeof(int): %ld\n", sizeof(int));
+ printf("sizeof(int *): %ld\n", sizeof(int *));
+ return 0;
+}
diff --git a/include/bits/alltypes.h b/include/bits/alltypes.h
new file mode 100644
index 00000000..b5d6f523
--- /dev/null
+++ b/include/bits/alltypes.h
@@ -0,0 +1,415 @@
+#define _Addr long
+#define _Int64 long
+#define _Reg long
+
+#define __BYTE_ORDER 1234
+#define __LONG_MAX 0x7fffffffffffffffL
+
+#ifndef __cplusplus
+#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
+typedef int wchar_t;
+#define __DEFINED_wchar_t
+#endif
+
+#endif
+
+#if defined(__FLT_EVAL_METHOD__) && __FLT_EVAL_METHOD__ == 2
+#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
+typedef long double float_t;
+#define __DEFINED_float_t
+#endif
+
+#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
+typedef long double double_t;
+#define __DEFINED_double_t
+#endif
+
+#else
+#if defined(__NEED_float_t) && !defined(__DEFINED_float_t)
+typedef float float_t;
+#define __DEFINED_float_t
+#endif
+
+#if defined(__NEED_double_t) && !defined(__DEFINED_double_t)
+typedef double double_t;
+#define __DEFINED_double_t
+#endif
+
+#endif
+
+#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t)
+typedef struct { long long __ll; long double __ld; } max_align_t;
+#define __DEFINED_max_align_t
+#endif
+
+#define __LITTLE_ENDIAN 1234
+#define __BIG_ENDIAN 4321
+#define __USE_TIME_BITS64 1
+
+#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
+typedef unsigned _Addr size_t;
+#define __DEFINED_size_t
+#endif
+
+#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t)
+typedef unsigned _Addr uintptr_t;
+#define __DEFINED_uintptr_t
+#endif
+
+#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t)
+typedef _Addr ptrdiff_t;
+#define __DEFINED_ptrdiff_t
+#endif
+
+#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t)
+typedef _Addr ssize_t;
+#define __DEFINED_ssize_t
+#endif
+
+#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t)
+typedef _Addr intptr_t;
+#define __DEFINED_intptr_t
+#endif
+
+#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t)
+typedef _Addr regoff_t;
+#define __DEFINED_regoff_t
+#endif
+
+#if defined(__NEED_register_t) && !defined(__DEFINED_register_t)
+typedef _Reg register_t;
+#define __DEFINED_register_t
+#endif
+
+#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
+typedef _Int64 time_t;
+#define __DEFINED_time_t
+#endif
+
+#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
+typedef _Int64 suseconds_t;
+#define __DEFINED_suseconds_t
+#endif
+
+
+#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
+typedef signed char int8_t;
+#define __DEFINED_int8_t
+#endif
+
+#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t)
+typedef signed short int16_t;
+#define __DEFINED_int16_t
+#endif
+
+#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t)
+typedef signed int int32_t;
+#define __DEFINED_int32_t
+#endif
+
+#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t)
+typedef signed _Int64 int64_t;
+#define __DEFINED_int64_t
+#endif
+
+#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t)
+typedef signed _Int64 intmax_t;
+#define __DEFINED_intmax_t
+#endif
+
+#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t)
+typedef unsigned char uint8_t;
+#define __DEFINED_uint8_t
+#endif
+
+#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t)
+typedef unsigned short uint16_t;
+#define __DEFINED_uint16_t
+#endif
+
+#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t)
+typedef unsigned int uint32_t;
+#define __DEFINED_uint32_t
+#endif
+
+#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t)
+typedef unsigned _Int64 uint64_t;
+#define __DEFINED_uint64_t
+#endif
+
+#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t)
+typedef unsigned _Int64 u_int64_t;
+#define __DEFINED_u_int64_t
+#endif
+
+#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t)
+typedef unsigned _Int64 uintmax_t;
+#define __DEFINED_uintmax_t
+#endif
+
+
+#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t)
+typedef unsigned mode_t;
+#define __DEFINED_mode_t
+#endif
+
+#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
+typedef unsigned _Reg nlink_t;
+#define __DEFINED_nlink_t
+#endif
+
+#if defined(__NEED_off_t) && !defined(__DEFINED_off_t)
+typedef _Int64 off_t;
+#define __DEFINED_off_t
+#endif
+
+#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t)
+typedef unsigned _Int64 ino_t;
+#define __DEFINED_ino_t
+#endif
+
+#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t)
+typedef unsigned _Int64 dev_t;
+#define __DEFINED_dev_t
+#endif
+
+#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t)
+typedef long blksize_t;
+#define __DEFINED_blksize_t
+#endif
+
+#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t)
+typedef _Int64 blkcnt_t;
+#define __DEFINED_blkcnt_t
+#endif
+
+#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t)
+typedef unsigned _Int64 fsblkcnt_t;
+#define __DEFINED_fsblkcnt_t
+#endif
+
+#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t)
+typedef unsigned _Int64 fsfilcnt_t;
+#define __DEFINED_fsfilcnt_t
+#endif
+
+
+#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
+typedef unsigned wint_t;
+#define __DEFINED_wint_t
+#endif
+
+#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t)
+typedef unsigned long wctype_t;
+#define __DEFINED_wctype_t
+#endif
+
+
+#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t)
+typedef void * timer_t;
+#define __DEFINED_timer_t
+#endif
+
+#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t)
+typedef int clockid_t;
+#define __DEFINED_clockid_t
+#endif
+
+#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t)
+typedef long clock_t;
+#define __DEFINED_clock_t
+#endif
+
+#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval)
+struct timeval { time_t tv_sec; suseconds_t tv_usec; };
+#define __DEFINED_struct_timeval
+#endif
+
+#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
+struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
+#define __DEFINED_struct_timespec
+#endif
+
+
+#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t)
+typedef int pid_t;
+#define __DEFINED_pid_t
+#endif
+
+#if defined(__NEED_id_t) && !defined(__DEFINED_id_t)
+typedef unsigned id_t;
+#define __DEFINED_id_t
+#endif
+
+#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t)
+typedef unsigned uid_t;
+#define __DEFINED_uid_t
+#endif
+
+#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t)
+typedef unsigned gid_t;
+#define __DEFINED_gid_t
+#endif
+
+#if defined(__NEED_key_t) && !defined(__DEFINED_key_t)
+typedef int key_t;
+#define __DEFINED_key_t
+#endif
+
+#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t)
+typedef unsigned useconds_t;
+#define __DEFINED_useconds_t
+#endif
+
+
+#ifdef __cplusplus
+#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
+typedef unsigned long pthread_t;
+#define __DEFINED_pthread_t
+#endif
+
+#else
+#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t)
+typedef struct __pthread * pthread_t;
+#define __DEFINED_pthread_t
+#endif
+
+#endif
+#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t)
+typedef int pthread_once_t;
+#define __DEFINED_pthread_once_t
+#endif
+
+#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t)
+typedef unsigned pthread_key_t;
+#define __DEFINED_pthread_key_t
+#endif
+
+#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t)
+typedef int pthread_spinlock_t;
+#define __DEFINED_pthread_spinlock_t
+#endif
+
+#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t)
+typedef struct { unsigned __attr; } pthread_mutexattr_t;
+#define __DEFINED_pthread_mutexattr_t
+#endif
+
+#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t)
+typedef struct { unsigned __attr; } pthread_condattr_t;
+#define __DEFINED_pthread_condattr_t
+#endif
+
+#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t)
+typedef struct { unsigned __attr; } pthread_barrierattr_t;
+#define __DEFINED_pthread_barrierattr_t
+#endif
+
+#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t)
+typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
+#define __DEFINED_pthread_rwlockattr_t
+#endif
+
+
+#if defined(__NEED_struct__IO_FILE) && !defined(__DEFINED_struct__IO_FILE)
+struct _IO_FILE { char __x; };
+#define __DEFINED_struct__IO_FILE
+#endif
+
+#if defined(__NEED_FILE) && !defined(__DEFINED_FILE)
+typedef struct _IO_FILE FILE;
+#define __DEFINED_FILE
+#endif
+
+
+#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
+typedef __builtin_va_list va_list;
+#define __DEFINED_va_list
+#endif
+
+#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
+typedef __builtin_va_list __isoc_va_list;
+#define __DEFINED___isoc_va_list
+#endif
+
+
+#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
+typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
+#define __DEFINED_mbstate_t
+#endif
+
+
+#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t)
+typedef struct __locale_struct * locale_t;
+#define __DEFINED_locale_t
+#endif
+
+
+#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t)
+typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
+#define __DEFINED_sigset_t
+#endif
+
+
+#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec)
+struct iovec { void *iov_base; size_t iov_len; };
+#define __DEFINED_struct_iovec
+#endif
+
+
+#if defined(__NEED_struct_winsize) && !defined(__DEFINED_struct_winsize)
+struct winsize { unsigned short ws_row, ws_col, ws_xpixel, ws_ypixel; };
+#define __DEFINED_struct_winsize
+#endif
+
+
+#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t)
+typedef unsigned socklen_t;
+#define __DEFINED_socklen_t
+#endif
+
+#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t)
+typedef unsigned short sa_family_t;
+#define __DEFINED_sa_family_t
+#endif
+
+
+#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
+typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
+#define __DEFINED_pthread_attr_t
+#endif
+
+#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
+typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
+#define __DEFINED_pthread_mutex_t
+#endif
+
+#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
+typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
+#define __DEFINED_mtx_t
+#endif
+
+#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
+typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
+#define __DEFINED_pthread_cond_t
+#endif
+
+#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
+typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
+#define __DEFINED_cnd_t
+#endif
+
+#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
+typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
+#define __DEFINED_pthread_rwlock_t
+#endif
+
+#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
+typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
+#define __DEFINED_pthread_barrier_t
+#endif
+
+
+#undef _Addr
+#undef _Int64
+#undef _Reg
diff --git a/include/bits/syscall.h b/include/bits/syscall.h
new file mode 100644
index 00000000..74a17f52
--- /dev/null
+++ b/include/bits/syscall.h
@@ -0,0 +1,715 @@
+#define __NR_read 0
+#define __NR_write 1
+#define __NR_open 2
+#define __NR_close 3
+#define __NR_stat 4
+#define __NR_fstat 5
+#define __NR_lstat 6
+#define __NR_poll 7
+#define __NR_lseek 8
+#define __NR_mmap 9
+#define __NR_mprotect 10
+#define __NR_munmap 11
+#define __NR_brk 12
+#define __NR_rt_sigaction 13
+#define __NR_rt_sigprocmask 14
+#define __NR_rt_sigreturn 15
+#define __NR_ioctl 16
+#define __NR_pread64 17
+#define __NR_pwrite64 18
+#define __NR_readv 19
+#define __NR_writev 20
+#define __NR_access 21
+#define __NR_pipe 22
+#define __NR_select 23
+#define __NR_sched_yield 24
+#define __NR_mremap 25
+#define __NR_msync 26
+#define __NR_mincore 27
+#define __NR_madvise 28
+#define __NR_shmget 29
+#define __NR_shmat 30
+#define __NR_shmctl 31
+#define __NR_dup 32
+#define __NR_dup2 33
+#define __NR_pause 34
+#define __NR_nanosleep 35
+#define __NR_getitimer 36
+#define __NR_alarm 37
+#define __NR_setitimer 38
+#define __NR_getpid 39
+#define __NR_sendfile 40
+#define __NR_socket 41
+#define __NR_connect 42
+#define __NR_accept 43
+#define __NR_sendto 44
+#define __NR_recvfrom 45
+#define __NR_sendmsg 46
+#define __NR_recvmsg 47
+#define __NR_shutdown 48
+#define __NR_bind 49
+#define __NR_listen 50
+#define __NR_getsockname 51
+#define __NR_getpeername 52
+#define __NR_socketpair 53
+#define __NR_setsockopt 54
+#define __NR_getsockopt 55
+#define __NR_clone 56
+#define __NR_fork 57
+#define __NR_vfork 58
+#define __NR_execve 59
+#define __NR_exit 60
+#define __NR_wait4 61
+#define __NR_kill 62
+#define __NR_uname 63
+#define __NR_semget 64
+#define __NR_semop 65
+#define __NR_semctl 66
+#define __NR_shmdt 67
+#define __NR_msgget 68
+#define __NR_msgsnd 69
+#define __NR_msgrcv 70
+#define __NR_msgctl 71
+#define __NR_fcntl 72
+#define __NR_flock 73
+#define __NR_fsync 74
+#define __NR_fdatasync 75
+#define __NR_truncate 76
+#define __NR_ftruncate 77
+#define __NR_getdents 78
+#define __NR_getcwd 79
+#define __NR_chdir 80
+#define __NR_fchdir 81
+#define __NR_rename 82
+#define __NR_mkdir 83
+#define __NR_rmdir 84
+#define __NR_creat 85
+#define __NR_link 86
+#define __NR_unlink 87
+#define __NR_symlink 88
+#define __NR_readlink 89
+#define __NR_chmod 90
+#define __NR_fchmod 91
+#define __NR_chown 92
+#define __NR_fchown 93
+#define __NR_lchown 94
+#define __NR_umask 95
+#define __NR_gettimeofday 96
+#define __NR_getrlimit 97
+#define __NR_getrusage 98
+#define __NR_sysinfo 99
+#define __NR_times 100
+#define __NR_ptrace 101
+#define __NR_getuid 102
+#define __NR_syslog 103
+#define __NR_getgid 104
+#define __NR_setuid 105
+#define __NR_setgid 106
+#define __NR_geteuid 107
+#define __NR_getegid 108
+#define __NR_setpgid 109
+#define __NR_getppid 110
+#define __NR_getpgrp 111
+#define __NR_setsid 112
+#define __NR_setreuid 113
+#define __NR_setregid 114
+#define __NR_getgroups 115
+#define __NR_setgroups 116
+#define __NR_setresuid 117
+#define __NR_getresuid 118
+#define __NR_setresgid 119
+#define __NR_getresgid 120
+#define __NR_getpgid 121
+#define __NR_setfsuid 122
+#define __NR_setfsgid 123
+#define __NR_getsid 124
+#define __NR_capget 125
+#define __NR_capset 126
+#define __NR_rt_sigpending 127
+#define __NR_rt_sigtimedwait 128
+#define __NR_rt_sigqueueinfo 129
+#define __NR_rt_sigsuspend 130
+#define __NR_sigaltstack 131
+#define __NR_utime 132
+#define __NR_mknod 133
+#define __NR_uselib 134
+#define __NR_personality 135
+#define __NR_ustat 136
+#define __NR_statfs 137
+#define __NR_fstatfs 138
+#define __NR_sysfs 139
+#define __NR_getpriority 140
+#define __NR_setpriority 141
+#define __NR_sched_setparam 142
+#define __NR_sched_getparam 143
+#define __NR_sched_setscheduler 144
+#define __NR_sched_getscheduler 145
+#define __NR_sched_get_priority_max 146
+#define __NR_sched_get_priority_min 147
+#define __NR_sched_rr_get_interval 148
+#define __NR_mlock 149
+#define __NR_munlock 150
+#define __NR_mlockall 151
+#define __NR_munlockall 152
+#define __NR_vhangup 153
+#define __NR_modify_ldt 154
+#define __NR_pivot_root 155
+#define __NR__sysctl 156
+#define __NR_prctl 157
+#define __NR_arch_prctl 158
+#define __NR_adjtimex 159
+#define __NR_setrlimit 160
+#define __NR_chroot 161
+#define __NR_sync 162
+#define __NR_acct 163
+#define __NR_settimeofday 164
+#define __NR_mount 165
+#define __NR_umount2 166
+#define __NR_swapon 167
+#define __NR_swapoff 168
+#define __NR_reboot 169
+#define __NR_sethostname 170
+#define __NR_setdomainname 171
+#define __NR_iopl 172
+#define __NR_ioperm 173
+#define __NR_create_module 174
+#define __NR_init_module 175
+#define __NR_delete_module 176
+#define __NR_get_kernel_syms 177
+#define __NR_query_module 178
+#define __NR_quotactl 179
+#define __NR_nfsservctl 180
+#define __NR_getpmsg 181
+#define __NR_putpmsg 182
+#define __NR_afs_syscall 183
+#define __NR_tuxcall 184
+#define __NR_security 185
+#define __NR_gettid 186
+#define __NR_readahead 187
+#define __NR_setxattr 188
+#define __NR_lsetxattr 189
+#define __NR_fsetxattr 190
+#define __NR_getxattr 191
+#define __NR_lgetxattr 192
+#define __NR_fgetxattr 193
+#define __NR_listxattr 194
+#define __NR_llistxattr 195
+#define __NR_flistxattr 196
+#define __NR_removexattr 197
+#define __NR_lremovexattr 198
+#define __NR_fremovexattr 199
+#define __NR_tkill 200
+#define __NR_time 201
+#define __NR_futex 202
+#define __NR_sched_setaffinity 203
+#define __NR_sched_getaffinity 204
+#define __NR_set_thread_area 205
+#define __NR_io_setup 206
+#define __NR_io_destroy 207
+#define __NR_io_getevents 208
+#define __NR_io_submit 209
+#define __NR_io_cancel 210
+#define __NR_get_thread_area 211
+#define __NR_lookup_dcookie 212
+#define __NR_epoll_create 213
+#define __NR_epoll_ctl_old 214
+#define __NR_epoll_wait_old 215
+#define __NR_remap_file_pages 216
+#define __NR_getdents64 217
+#define __NR_set_tid_address 218
+#define __NR_restart_syscall 219
+#define __NR_semtimedop 220
+#define __NR_fadvise64 221
+#define __NR_timer_create 222
+#define __NR_timer_settime 223
+#define __NR_timer_gettime 224
+#define __NR_timer_getoverrun 225
+#define __NR_timer_delete 226
+#define __NR_clock_settime 227
+#define __NR_clock_gettime 228
+#define __NR_clock_getres 229
+#define __NR_clock_nanosleep 230
+#define __NR_exit_group 231
+#define __NR_epoll_wait 232
+#define __NR_epoll_ctl 233
+#define __NR_tgkill 234
+#define __NR_utimes 235
+#define __NR_vserver 236
+#define __NR_mbind 237
+#define __NR_set_mempolicy 238
+#define __NR_get_mempolicy 239
+#define __NR_mq_open 240
+#define __NR_mq_unlink 241
+#define __NR_mq_timedsend 242
+#define __NR_mq_timedreceive 243
+#define __NR_mq_notify 244
+#define __NR_mq_getsetattr 245
+#define __NR_kexec_load 246
+#define __NR_waitid 247
+#define __NR_add_key 248
+#define __NR_request_key 249
+#define __NR_keyctl 250
+#define __NR_ioprio_set 251
+#define __NR_ioprio_get 252
+#define __NR_inotify_init 253
+#define __NR_inotify_add_watch 254
+#define __NR_inotify_rm_watch 255
+#define __NR_migrate_pages 256
+#define __NR_openat 257
+#define __NR_mkdirat 258
+#define __NR_mknodat 259
+#define __NR_fchownat 260
+#define __NR_futimesat 261
+#define __NR_newfstatat 262
+#define __NR_unlinkat 263
+#define __NR_renameat 264
+#define __NR_linkat 265
+#define __NR_symlinkat 266
+#define __NR_readlinkat 267
+#define __NR_fchmodat 268
+#define __NR_faccessat 269
+#define __NR_pselect6 270
+#define __NR_ppoll 271
+#define __NR_unshare 272
+#define __NR_set_robust_list 273
+#define __NR_get_robust_list 274
+#define __NR_splice 275
+#define __NR_tee 276
+#define __NR_sync_file_range 277
+#define __NR_vmsplice 278
+#define __NR_move_pages 279
+#define __NR_utimensat 280
+#define __NR_epoll_pwait 281
+#define __NR_signalfd 282
+#define __NR_timerfd_create 283
+#define __NR_eventfd 284
+#define __NR_fallocate 285
+#define __NR_timerfd_settime 286
+#define __NR_timerfd_gettime 287
+#define __NR_accept4 288
+#define __NR_signalfd4 289
+#define __NR_eventfd2 290
+#define __NR_epoll_create1 291
+#define __NR_dup3 292
+#define __NR_pipe2 293
+#define __NR_inotify_init1 294
+#define __NR_preadv 295
+#define __NR_pwritev 296
+#define __NR_rt_tgsigqueueinfo 297
+#define __NR_perf_event_open 298
+#define __NR_recvmmsg 299
+#define __NR_fanotify_init 300
+#define __NR_fanotify_mark 301
+#define __NR_prlimit64 302
+#define __NR_name_to_handle_at 303
+#define __NR_open_by_handle_at 304
+#define __NR_clock_adjtime 305
+#define __NR_syncfs 306
+#define __NR_sendmmsg 307
+#define __NR_setns 308
+#define __NR_getcpu 309
+#define __NR_process_vm_readv 310
+#define __NR_process_vm_writev 311
+#define __NR_kcmp 312
+#define __NR_finit_module 313
+#define __NR_sched_setattr 314
+#define __NR_sched_getattr 315
+#define __NR_renameat2 316
+#define __NR_seccomp 317
+#define __NR_getrandom 318
+#define __NR_memfd_create 319
+#define __NR_kexec_file_load 320
+#define __NR_bpf 321
+#define __NR_execveat 322
+#define __NR_userfaultfd 323
+#define __NR_membarrier 324
+#define __NR_mlock2 325
+#define __NR_copy_file_range 326
+#define __NR_preadv2 327
+#define __NR_pwritev2 328
+#define __NR_pkey_mprotect 329
+#define __NR_pkey_alloc 330
+#define __NR_pkey_free 331
+#define __NR_statx 332
+#define __NR_io_pgetevents 333
+#define __NR_rseq 334
+#define __NR_pidfd_send_signal 424
+#define __NR_io_uring_setup 425
+#define __NR_io_uring_enter 426
+#define __NR_io_uring_register 427
+#define __NR_open_tree 428
+#define __NR_move_mount 429
+#define __NR_fsopen 430
+#define __NR_fsconfig 431
+#define __NR_fsmount 432
+#define __NR_fspick 433
+#define __NR_pidfd_open 434
+#define __NR_clone3 435
+#define __NR_close_range 436
+#define __NR_openat2 437
+#define __NR_pidfd_getfd 438
+#define __NR_faccessat2 439
+#define __NR_process_madvise 440
+#define __NR_epoll_pwait2 441
+#define __NR_mount_setattr 442
+#define __NR_landlock_create_ruleset 444
+#define __NR_landlock_add_rule 445
+#define __NR_landlock_restrict_self 446
+
+#define SYS_read 0
+#define SYS_write 1
+#define SYS_open 2
+#define SYS_close 3
+#define SYS_stat 4
+#define SYS_fstat 5
+#define SYS_lstat 6
+#define SYS_poll 7
+#define SYS_lseek 8
+#define SYS_mmap 9
+#define SYS_mprotect 10
+#define SYS_munmap 11
+#define SYS_brk 12
+#define SYS_rt_sigaction 13
+#define SYS_rt_sigprocmask 14
+#define SYS_rt_sigreturn 15
+#define SYS_ioctl 16
+#define SYS_pread64 17
+#define SYS_pwrite64 18
+#define SYS_readv 19
+#define SYS_writev 20
+#define SYS_access 21
+#define SYS_pipe 22
+#define SYS_select 23
+#define SYS_sched_yield 24
+#define SYS_mremap 25
+#define SYS_msync 26
+#define SYS_mincore 27
+#define SYS_madvise 28
+#define SYS_shmget 29
+#define SYS_shmat 30
+#define SYS_shmctl 31
+#define SYS_dup 32
+#define SYS_dup2 33
+#define SYS_pause 34
+#define SYS_nanosleep 35
+#define SYS_getitimer 36
+#define SYS_alarm 37
+#define SYS_setitimer 38
+#define SYS_getpid 39
+#define SYS_sendfile 40
+#define SYS_socket 41
+#define SYS_connect 42
+#define SYS_accept 43
+#define SYS_sendto 44
+#define SYS_recvfrom 45
+#define SYS_sendmsg 46
+#define SYS_recvmsg 47
+#define SYS_shutdown 48
+#define SYS_bind 49
+#define SYS_listen 50
+#define SYS_getsockname 51
+#define SYS_getpeername 52
+#define SYS_socketpair 53
+#define SYS_setsockopt 54
+#define SYS_getsockopt 55
+#define SYS_clone 56
+#define SYS_fork 57
+#define SYS_vfork 58
+#define SYS_execve 59
+#define SYS_exit 60
+#define SYS_wait4 61
+#define SYS_kill 62
+#define SYS_uname 63
+#define SYS_semget 64
+#define SYS_semop 65
+#define SYS_semctl 66
+#define SYS_shmdt 67
+#define SYS_msgget 68
+#define SYS_msgsnd 69
+#define SYS_msgrcv 70
+#define SYS_msgctl 71
+#define SYS_fcntl 72
+#define SYS_flock 73
+#define SYS_fsync 74
+#define SYS_fdatasync 75
+#define SYS_truncate 76
+#define SYS_ftruncate 77
+#define SYS_getdents 78
+#define SYS_getcwd 79
+#define SYS_chdir 80
+#define SYS_fchdir 81
+#define SYS_rename 82
+#define SYS_mkdir 83
+#define SYS_rmdir 84
+#define SYS_creat 85
+#define SYS_link 86
+#define SYS_unlink 87
+#define SYS_symlink 88
+#define SYS_readlink 89
+#define SYS_chmod 90
+#define SYS_fchmod 91
+#define SYS_chown 92
+#define SYS_fchown 93
+#define SYS_lchown 94
+#define SYS_umask 95
+#define SYS_gettimeofday 96
+#define SYS_getrlimit 97
+#define SYS_getrusage 98
+#define SYS_sysinfo 99
+#define SYS_times 100
+#define SYS_ptrace 101
+#define SYS_getuid 102
+#define SYS_syslog 103
+#define SYS_getgid 104
+#define SYS_setuid 105
+#define SYS_setgid 106
+#define SYS_geteuid 107
+#define SYS_getegid 108
+#define SYS_setpgid 109
+#define SYS_getppid 110
+#define SYS_getpgrp 111
+#define SYS_setsid 112
+#define SYS_setreuid 113
+#define SYS_setregid 114
+#define SYS_getgroups 115
+#define SYS_setgroups 116
+#define SYS_setresuid 117
+#define SYS_getresuid 118
+#define SYS_setresgid 119
+#define SYS_getresgid 120
+#define SYS_getpgid 121
+#define SYS_setfsuid 122
+#define SYS_setfsgid 123
+#define SYS_getsid 124
+#define SYS_capget 125
+#define SYS_capset 126
+#define SYS_rt_sigpending 127
+#define SYS_rt_sigtimedwait 128
+#define SYS_rt_sigqueueinfo 129
+#define SYS_rt_sigsuspend 130
+#define SYS_sigaltstack 131
+#define SYS_utime 132
+#define SYS_mknod 133
+#define SYS_uselib 134
+#define SYS_personality 135
+#define SYS_ustat 136
+#define SYS_statfs 137
+#define SYS_fstatfs 138
+#define SYS_sysfs 139
+#define SYS_getpriority 140
+#define SYS_setpriority 141
+#define SYS_sched_setparam 142
+#define SYS_sched_getparam 143
+#define SYS_sched_setscheduler 144
+#define SYS_sched_getscheduler 145
+#define SYS_sched_get_priority_max 146
+#define SYS_sched_get_priority_min 147
+#define SYS_sched_rr_get_interval 148
+#define SYS_mlock 149
+#define SYS_munlock 150
+#define SYS_mlockall 151
+#define SYS_munlockall 152
+#define SYS_vhangup 153
+#define SYS_modify_ldt 154
+#define SYS_pivot_root 155
+#define SYS__sysctl 156
+#define SYS_prctl 157
+#define SYS_arch_prctl 158
+#define SYS_adjtimex 159
+#define SYS_setrlimit 160
+#define SYS_chroot 161
+#define SYS_sync 162
+#define SYS_acct 163
+#define SYS_settimeofday 164
+#define SYS_mount 165
+#define SYS_umount2 166
+#define SYS_swapon 167
+#define SYS_swapoff 168
+#define SYS_reboot 169
+#define SYS_sethostname 170
+#define SYS_setdomainname 171
+#define SYS_iopl 172
+#define SYS_ioperm 173
+#define SYS_create_module 174
+#define SYS_init_module 175
+#define SYS_delete_module 176
+#define SYS_get_kernel_syms 177
+#define SYS_query_module 178
+#define SYS_quotactl 179
+#define SYS_nfsservctl 180
+#define SYS_getpmsg 181
+#define SYS_putpmsg 182
+#define SYS_afs_syscall 183
+#define SYS_tuxcall 184
+#define SYS_security 185
+#define SYS_gettid 186
+#define SYS_readahead 187
+#define SYS_setxattr 188
+#define SYS_lsetxattr 189
+#define SYS_fsetxattr 190
+#define SYS_getxattr 191
+#define SYS_lgetxattr 192
+#define SYS_fgetxattr 193
+#define SYS_listxattr 194
+#define SYS_llistxattr 195
+#define SYS_flistxattr 196
+#define SYS_removexattr 197
+#define SYS_lremovexattr 198
+#define SYS_fremovexattr 199
+#define SYS_tkill 200
+#define SYS_time 201
+#define SYS_futex 202
+#define SYS_sched_setaffinity 203
+#define SYS_sched_getaffinity 204
+#define SYS_set_thread_area 205
+#define SYS_io_setup 206
+#define SYS_io_destroy 207
+#define SYS_io_getevents 208
+#define SYS_io_submit 209
+#define SYS_io_cancel 210
+#define SYS_get_thread_area 211
+#define SYS_lookup_dcookie 212
+#define SYS_epoll_create 213
+#define SYS_epoll_ctl_old 214
+#define SYS_epoll_wait_old 215
+#define SYS_remap_file_pages 216
+#define SYS_getdents64 217
+#define SYS_set_tid_address 218
+#define SYS_restart_syscall 219
+#define SYS_semtimedop 220
+#define SYS_fadvise64 221
+#define SYS_timer_create 222
+#define SYS_timer_settime 223
+#define SYS_timer_gettime 224
+#define SYS_timer_getoverrun 225
+#define SYS_timer_delete 226
+#define SYS_clock_settime 227
+#define SYS_clock_gettime 228
+#define SYS_clock_getres 229
+#define SYS_clock_nanosleep 230
+#define SYS_exit_group 231
+#define SYS_epoll_wait 232
+#define SYS_epoll_ctl 233
+#define SYS_tgkill 234
+#define SYS_utimes 235
+#define SYS_vserver 236
+#define SYS_mbind 237
+#define SYS_set_mempolicy 238
+#define SYS_get_mempolicy 239
+#define SYS_mq_open 240
+#define SYS_mq_unlink 241
+#define SYS_mq_timedsend 242
+#define SYS_mq_timedreceive 243
+#define SYS_mq_notify 244
+#define SYS_mq_getsetattr 245
+#define SYS_kexec_load 246
+#define SYS_waitid 247
+#define SYS_add_key 248
+#define SYS_request_key 249
+#define SYS_keyctl 250
+#define SYS_ioprio_set 251
+#define SYS_ioprio_get 252
+#define SYS_inotify_init 253
+#define SYS_inotify_add_watch 254
+#define SYS_inotify_rm_watch 255
+#define SYS_migrate_pages 256
+#define SYS_openat 257
+#define SYS_mkdirat 258
+#define SYS_mknodat 259
+#define SYS_fchownat 260
+#define SYS_futimesat 261
+#define SYS_newfstatat 262
+#define SYS_unlinkat 263
+#define SYS_renameat 264
+#define SYS_linkat 265
+#define SYS_symlinkat 266
+#define SYS_readlinkat 267
+#define SYS_fchmodat 268
+#define SYS_faccessat 269
+#define SYS_pselect6 270
+#define SYS_ppoll 271
+#define SYS_unshare 272
+#define SYS_set_robust_list 273
+#define SYS_get_robust_list 274
+#define SYS_splice 275
+#define SYS_tee 276
+#define SYS_sync_file_range 277
+#define SYS_vmsplice 278
+#define SYS_move_pages 279
+#define SYS_utimensat 280
+#define SYS_epoll_pwait 281
+#define SYS_signalfd 282
+#define SYS_timerfd_create 283
+#define SYS_eventfd 284
+#define SYS_fallocate 285
+#define SYS_timerfd_settime 286
+#define SYS_timerfd_gettime 287
+#define SYS_accept4 288
+#define SYS_signalfd4 289
+#define SYS_eventfd2 290
+#define SYS_epoll_create1 291
+#define SYS_dup3 292
+#define SYS_pipe2 293
+#define SYS_inotify_init1 294
+#define SYS_preadv 295
+#define SYS_pwritev 296
+#define SYS_rt_tgsigqueueinfo 297
+#define SYS_perf_event_open 298
+#define SYS_recvmmsg 299
+#define SYS_fanotify_init 300
+#define SYS_fanotify_mark 301
+#define SYS_prlimit64 302
+#define SYS_name_to_handle_at 303
+#define SYS_open_by_handle_at 304
+#define SYS_clock_adjtime 305
+#define SYS_syncfs 306
+#define SYS_sendmmsg 307
+#define SYS_setns 308
+#define SYS_getcpu 309
+#define SYS_process_vm_readv 310
+#define SYS_process_vm_writev 311
+#define SYS_kcmp 312
+#define SYS_finit_module 313
+#define SYS_sched_setattr 314
+#define SYS_sched_getattr 315
+#define SYS_renameat2 316
+#define SYS_seccomp 317
+#define SYS_getrandom 318
+#define SYS_memfd_create 319
+#define SYS_kexec_file_load 320
+#define SYS_bpf 321
+#define SYS_execveat 322
+#define SYS_userfaultfd 323
+#define SYS_membarrier 324
+#define SYS_mlock2 325
+#define SYS_copy_file_range 326
+#define SYS_preadv2 327
+#define SYS_pwritev2 328
+#define SYS_pkey_mprotect 329
+#define SYS_pkey_alloc 330
+#define SYS_pkey_free 331
+#define SYS_statx 332
+#define SYS_io_pgetevents 333
+#define SYS_rseq 334
+#define SYS_pidfd_send_signal 424
+#define SYS_io_uring_setup 425
+#define SYS_io_uring_enter 426
+#define SYS_io_uring_register 427
+#define SYS_open_tree 428
+#define SYS_move_mount 429
+#define SYS_fsopen 430
+#define SYS_fsconfig 431
+#define SYS_fsmount 432
+#define SYS_fspick 433
+#define SYS_pidfd_open 434
+#define SYS_clone3 435
+#define SYS_close_range 436
+#define SYS_openat2 437
+#define SYS_pidfd_getfd 438
+#define SYS_faccessat2 439
+#define SYS_process_madvise 440
+#define SYS_epoll_pwait2 441
+#define SYS_mount_setattr 442
+#define SYS_landlock_create_ruleset 444
+#define SYS_landlock_add_rule 445
+#define SYS_landlock_restrict_self 446
diff --git a/mkdeps.sh b/mkdeps.sh
new file mode 100755
index 00000000..440b5600
--- /dev/null
+++ b/mkdeps.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+set -eu
+
+varlist() {
+ printf '%s = \\\n' "$1"
+ sed 's|^\(.*\)$|\t\1 \\|'
+ printf '\n'
+}
+
+cfiles() {
+ git ls-files src/ | grep '\.c$' | grep -v '^src/main\.c$' | sort
+}
+
+export LANG=POSIX.UTF-8
+
+find doc/*.en.*.in 2>/dev/null | sort | varlist 'manpages.en.in' ||:
+echo 'manpages.in = $(manpages.en.in)'
+printf 'catalogs.en.msg = %s\n' "$(find src/ -name '*.msg')"
+echo 'catalogs.msg = $(catalogs.en.msg)'
+printf '\n'
+
+find tests/fuzz/*.c | sort | varlist 'fuzz.c'
+find tests/fuzz/*.c | sort | awk -F. '{ printf "%s.xa: %s.o\n", $1, $1 }'
+find tests/fuzz/*.c | sort | awk -F. '{ printf "%s.bin-check: %s.bin\n", $1, $1 }'
+printf '\n\n'
+
+cfiles | varlist 'sources.c'
+ldev deps $(cfiles)
diff --git a/src/config.h.in b/src/config.h.in
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/config.h.in
diff --git a/src/grovel.h b/src/grovel.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/grovel.h
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 00000000..1d658dd1
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,4 @@
+int
+main(void) {
+ return 0;
+}
diff --git a/tests/fuzz/another.c b/tests/fuzz/another.c
new file mode 100644
index 00000000..7fbfe075
--- /dev/null
+++ b/tests/fuzz/another.c
@@ -0,0 +1,17 @@
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+static bool
+fuzz_me(const uint8_t *const data, const size_t size) {
+ (void)data;
+ (void)size;
+ return true;
+}
+
+int
+LLVMFuzzerTestOneInput(const uint8_t *const data, const size_t size) {
+ int rc = 0;
+ fuzz_me(data, size);
+ return rc;
+}
diff --git a/tests/fuzz/hello.c b/tests/fuzz/hello.c
new file mode 100644
index 00000000..7fbfe075
--- /dev/null
+++ b/tests/fuzz/hello.c
@@ -0,0 +1,17 @@
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+static bool
+fuzz_me(const uint8_t *const data, const size_t size) {
+ (void)data;
+ (void)size;
+ return true;
+}
+
+int
+LLVMFuzzerTestOneInput(const uint8_t *const data, const size_t size) {
+ int rc = 0;
+ fuzz_me(data, size);
+ return rc;
+}
diff --git a/tools/add-cfi.common.awk b/tools/add-cfi.common.awk
deleted file mode 100644
index 04482d43..00000000
--- a/tools/add-cfi.common.awk
+++ /dev/null
@@ -1,26 +0,0 @@
-function hex2int(str, i) {
- str = tolower(str)
-
- for (i = 1; i <= 16; i++) {
- char = substr("0123456789abcdef", i, 1)
- lookup[char] = i-1
- }
-
- result = 0
- for (i = 1; i <= length(str); i++) {
- result = result * 16
- char = substr(str, i, 1)
- result = result + lookup[char]
- }
- return result
-}
-
-function parse_const(str) {
- sign = sub(/^-/, "", str)
- hex = sub(/^0x/, "", str)
- if (hex)
- n = hex2int(str)
- else
- n = str+0
- return sign ? -n : n
-}
diff --git a/tools/add-cfi.i386.awk b/tools/add-cfi.i386.awk
deleted file mode 100644
index d05037de..00000000
--- a/tools/add-cfi.i386.awk
+++ /dev/null
@@ -1,209 +0,0 @@
-# Insert GAS CFI directives ("control frame information") into x86-32 asm input
-#
-# CFI directives tell the assembler how to generate "stack frame" debug info
-# This information can tell a debugger (like gdb) how to find the current stack
-# frame at any point in the program code, and how to find the values which
-# various registers had at higher points in the call stack
-# With this information, the debugger can show a backtrace, and you can move up
-# and down the call stack and examine the values of local variables
-
-BEGIN {
- # don't put CFI data in the .eh_frame ELF section (which we don't keep)
- print ".cfi_sections .debug_frame"
-
- # only emit CFI directives inside a function
- in_function = 0
-
- # emit .loc directives with line numbers from original source
- printf ".file 1 \"%s\"\n", ARGV[1]
- line_number = 0
-
- # used to detect "call label; label:" trick
- called = ""
-}
-
-function get_const1() {
- # for instructions with 2 operands, get 1st operand (assuming it is constant)
- match($0, /-?(0x[0-9a-fA-F]+|[0-9]+),/)
- return parse_const(substr($0, RSTART, RLENGTH-1))
-}
-
-function canonicalize_reg(register) {
- if (match(register, /^e/))
- return register
- else if (match(register, /[hl]$/)) # AH, AL, BH, BL, etc
- return "e" substr(register, 1, 1) "x"
- else # AX, BX, CX, etc
- return "e" register
-}
-function get_reg() {
- # only use if you already know there is 1 and only 1 register
- match($0, /%e?([abcd][hlx]|si|di|bp)/)
- return canonicalize_reg(substr($0, RSTART+1, RLENGTH-1))
-}
-function get_reg1() {
- # for instructions with 2 operands, get 1st operand (assuming it is register)
- match($0, /%e?([abcd][hlx]|si|di|bp),/)
- return canonicalize_reg(substr($0, RSTART+1, RLENGTH-2))
-}
-function get_reg2() {
- # for instructions with 2 operands, get 2nd operand (assuming it is register)
- match($0, /,%e?([abcd][hlx]|si|di|bp)/)
- return canonicalize_reg(substr($0, RSTART+2, RLENGTH-2))
-}
-
-function adjust_sp_offset(delta) {
- if (in_function)
- printf ".cfi_adjust_cfa_offset %d\n", delta
-}
-
-{
- line_number = line_number + 1
-
- # clean the input up before doing anything else
- # delete comments
- gsub(/(#|\/\/).*/, "")
-
- # canonicalize whitespace
- gsub(/[ \t]+/, " ") # mawk doesn't understand \s
- gsub(/ *, */, ",")
- gsub(/ *: */, ": ")
- gsub(/ $/, "")
- gsub(/^ /, "")
-}
-
-# check for assembler directives which we care about
-/^\.(section|data|text)/ {
- # a .cfi_startproc/.cfi_endproc pair should be within the same section
- # otherwise, clang will choke when generating ELF output
- if (in_function) {
- print ".cfi_endproc"
- in_function = 0
- }
-}
-/^\.type [a-zA-Z0-9_]+,@function/ {
- functions[substr($2, 1, length($2)-10)] = 1
-}
-# not interested in assembler directives beyond this, just pass them through
-/^\./ {
- print
- next
-}
-
-/^[a-zA-Z0-9_]+:/ {
- label = substr($1, 1, length($1)-1) # drop trailing :
-
- if (called == label) {
- # note adjustment of stack pointer from "call label; label:"
- adjust_sp_offset(4)
- }
-
- if (functions[label]) {
- if (in_function)
- print ".cfi_endproc"
-
- in_function = 1
- print ".cfi_startproc"
-
- for (register in saved)
- delete saved[register]
- for (register in dirty)
- delete dirty[register]
- }
-
- # an instruction may follow on the same line, so continue processing
-}
-
-/^$/ { next }
-
-{
- called = ""
- printf ".loc 1 %d\n", line_number
- print
-}
-
-# KEEPING UP WITH THE STACK POINTER
-# We do NOT attempt to understand foolish and ridiculous tricks like stashing
-# the stack pointer and then using %esp as a scratch register, or bitshifting
-# it or taking its square root or anything stupid like that.
-# %esp should only be adjusted by pushing/popping or adding/subtracting constants
-#
-/pushl?/ {
- if (match($0, / %(ax|bx|cx|dx|di|si|bp|sp)/))
- adjust_sp_offset(2)
- else
- adjust_sp_offset(4)
-}
-/popl?/ {
- if (match($0, / %(ax|bx|cx|dx|di|si|bp|sp)/))
- adjust_sp_offset(-2)
- else
- adjust_sp_offset(-4)
-}
-/addl? \$-?(0x[0-9a-fA-F]+|[0-9]+),%esp/ { adjust_sp_offset(-get_const1()) }
-/subl? \$-?(0x[0-9a-fA-F]+|[0-9]+),%esp/ { adjust_sp_offset(get_const1()) }
-
-/call/ {
- if (match($0, /call [0-9]+f/)) # "forward" label
- called = substr($0, RSTART+5, RLENGTH-6)
- else if (match($0, /call [0-9a-zA-Z_]+/))
- called = substr($0, RSTART+5, RLENGTH-5)
-}
-
-# TRACKING REGISTER VALUES FROM THE PREVIOUS STACK FRAME
-#
-/pushl? %e(ax|bx|cx|dx|si|di|bp)/ { # don't match "push (%reg)"
- # if a register is being pushed, and its value has not changed since the
- # beginning of this function, the pushed value can be used when printing
- # local variables at the next level up the stack
- # emit '.cfi_rel_offset' for that
-
- if (in_function) {
- register = get_reg()
- if (!saved[register] && !dirty[register]) {
- printf ".cfi_rel_offset %s,0\n", register
- saved[register] = 1
- }
- }
-}
-
-/movl? %e(ax|bx|cx|dx|si|di|bp),-?(0x[0-9a-fA-F]+|[0-9]+)?\(%esp\)/ {
- if (in_function) {
- register = get_reg()
- if (match($0, /-?(0x[0-9a-fA-F]+|[0-9]+)\(%esp\)/)) {
- offset = parse_const(substr($0, RSTART, RLENGTH-6))
- } else {
- offset = 0
- }
- if (!saved[register] && !dirty[register]) {
- printf ".cfi_rel_offset %s,%d\n", register, offset
- saved[register] = 1
- }
- }
-}
-
-# IF REGISTER VALUES ARE UNCEREMONIOUSLY TRASHED
-# ...then we want to know about it.
-#
-function trashed(register) {
- if (in_function && !saved[register] && !dirty[register]) {
- printf ".cfi_undefined %s\n", register
- }
- dirty[register] = 1
-}
-# this does NOT exhaustively check for all possible instructions which could
-# overwrite a register value inherited from the caller (just the common ones)
-/mov.*,%e?([abcd][hlx]|si|di|bp)$/ { trashed(get_reg2()) }
-/(add|addl|sub|subl|and|or|xor|lea|sal|sar|shl|shr).*,%e?([abcd][hlx]|si|di|bp)$/ {
- trashed(get_reg2())
-}
-/^i?mul [^,]*$/ { trashed("eax"); trashed("edx") }
-/^i?mul.*,%e?([abcd][hlx]|si|di|bp)$/ { trashed(get_reg2()) }
-/^i?div/ { trashed("eax"); trashed("edx") }
-/(dec|inc|not|neg|pop) %e?([abcd][hlx]|si|di|bp)/ { trashed(get_reg()) }
-/cpuid/ { trashed("eax"); trashed("ebx"); trashed("ecx"); trashed("edx") }
-
-END {
- if (in_function)
- print ".cfi_endproc"
-}
diff --git a/tools/add-cfi.x86_64.awk b/tools/add-cfi.x86_64.awk
deleted file mode 100644
index 7e1513d6..00000000
--- a/tools/add-cfi.x86_64.awk
+++ /dev/null
@@ -1,196 +0,0 @@
-# Insert GAS CFI directives ("control frame information") into x86-64 asm input
-
-BEGIN {
- # don't put CFI data in the .eh_frame ELF section (which we don't keep)
- print ".cfi_sections .debug_frame"
-
- # only emit CFI directives inside a function
- in_function = 0
-
- # emit .loc directives with line numbers from original source
- printf ".file 1 \"%s\"\n", ARGV[1]
- line_number = 0
-
- # used to detect "call label; label:" trick
- called = ""
-}
-
-function get_const1() {
- # for instructions with 2 operands, get 1st operand (assuming it is constant)
- match($0, /-?(0x[0-9a-fA-F]+|[0-9]+),/)
- return parse_const(substr($0, RSTART, RLENGTH-1))
-}
-
-function canonicalize_reg(register) {
- if (match(register, /^r/))
- return register
- else if (match(register, /^e/))
- return "r" substr(register, 2, length(register)-1)
- else if (match(register, /[hl]$/)) # AH, AL, BH, BL, etc
- return "r" substr(register, 1, 1) "x"
- else # AX, BX, CX, etc
- return "r" register
-}
-function get_reg() {
- # only use if you already know there is 1 and only 1 register
- match($0, /%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)/)
- return canonicalize_reg(substr($0, RSTART+1, RLENGTH-1))
-}
-function get_reg1() {
- # for instructions with 2 operands, get 1st operand (assuming it is register)
- match($0, /%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15),/)
- return canonicalize_reg(substr($0, RSTART+1, RLENGTH-2))
-}
-function get_reg2() {
- # for instructions with 2 operands, get 2nd operand (assuming it is register)
- match($0, /,%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)/)
- return canonicalize_reg(substr($0, RSTART+2, RLENGTH-2))
-}
-
-function adjust_sp_offset(delta) {
- if (in_function)
- printf ".cfi_adjust_cfa_offset %d\n", delta
-}
-
-{
- line_number = line_number + 1
-
- # clean the input up before doing anything else
- # delete comments
- gsub(/(#|\/\/).*/, "")
-
- # canonicalize whitespace
- gsub(/[ \t]+/, " ") # mawk doesn't understand \s
- gsub(/ *, */, ",")
- gsub(/ *: */, ": ")
- gsub(/ $/, "")
- gsub(/^ /, "")
-}
-
-# check for assembler directives which we care about
-/^\.(section|data|text)/ {
- # a .cfi_startproc/.cfi_endproc pair should be within the same section
- # otherwise, clang will choke when generating ELF output
- if (in_function) {
- print ".cfi_endproc"
- in_function = 0
- }
-}
-/^\.type [a-zA-Z0-9_]+,@function/ {
- functions[substr($2, 1, length($2)-10)] = 1
-}
-# not interested in assembler directives beyond this, just pass them through
-/^\./ {
- print
- next
-}
-
-/^[a-zA-Z0-9_]+:/ {
- label = substr($1, 1, length($1)-1) # drop trailing :
-
- if (called == label) {
- # note adjustment of stack pointer from "call label; label:"
- adjust_sp_offset(8)
- }
-
- if (functions[label]) {
- if (in_function)
- print ".cfi_endproc"
-
- in_function = 1
- print ".cfi_startproc"
-
- for (register in saved)
- delete saved[register]
- for (register in dirty)
- delete dirty[register]
- }
-
- # an instruction may follow on the same line, so continue processing
-}
-
-/^$/ { next }
-
-{
- called = ""
- printf ".loc 1 %d\n", line_number
- print
-}
-
-# KEEPING UP WITH THE STACK POINTER
-# %rsp should only be adjusted by pushing/popping or adding/subtracting constants
-#
-/pushl?/ {
- adjust_sp_offset(8)
-}
-/popl?/ {
- adjust_sp_offset(-8)
-}
-/addl? \$-?(0x[0-9a-fA-F]+|[0-9]+),%rsp/ { adjust_sp_offset(-get_const1()) }
-/subl? \$-?(0x[0-9a-fA-F]+|[0-9]+),%rsp/ { adjust_sp_offset(get_const1()) }
-
-/call/ {
- if (match($0, /call [0-9]+f/)) # "forward" label
- called = substr($0, RSTART+5, RLENGTH-6)
- else if (match($0, /call [0-9a-zA-Z_]+/))
- called = substr($0, RSTART+5, RLENGTH-5)
-}
-
-# TRACKING REGISTER VALUES FROM THE PREVIOUS STACK FRAME
-#
-/pushl? %r(ax|bx|cx|dx|si|di|bp|8|9|10|11|12|13|14|15)/ { # don't match "push (%reg)"
- # if a register is being pushed, and its value has not changed since the
- # beginning of this function, the pushed value can be used when printing
- # local variables at the next level up the stack
- # emit '.cfi_rel_offset' for that
-
- if (in_function) {
- register = get_reg()
- if (!saved[register] && !dirty[register]) {
- printf ".cfi_rel_offset %s,0\n", register
- saved[register] = 1
- }
- }
-}
-
-/movl? %r(ax|bx|cx|dx|si|di|bp|8|9|10|11|12|13|14|15),-?(0x[0-9a-fA-F]+|[0-9]+)?\(%rsp\)/ {
- if (in_function) {
- register = get_reg()
- if (match($0, /-?(0x[0-9a-fA-F]+|[0-9]+)\(%rsp\)/)) {
- offset = parse_const(substr($0, RSTART, RLENGTH-6))
- } else {
- offset = 0
- }
- if (!saved[register] && !dirty[register]) {
- printf ".cfi_rel_offset %s,%d\n", register, offset
- saved[register] = 1
- }
- }
-}
-
-# IF REGISTER VALUES ARE UNCEREMONIOUSLY TRASHED
-# ...then we want to know about it.
-#
-function trashed(register) {
- if (in_function && !saved[register] && !dirty[register]) {
- printf ".cfi_undefined %s\n", register
- }
- dirty[register] = 1
-}
-# this does NOT exhaustively check for all possible instructions which could
-# overwrite a register value inherited from the caller (just the common ones)
-/mov.*,%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)$/ { trashed(get_reg2()) }
-/(add|addl|sub|subl|and|or|xor|lea|sal|sar|shl|shr).*,%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)$/ {
- trashed(get_reg2())
-}
-/^i?mul [^,]*$/ { trashed("rax"); trashed("rdx") }
-/^i?mul.*,%[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)$/ { trashed(get_reg2()) }
-/^i?div/ { trashed("rax"); trashed("rdx") }
-
-/(dec|inc|not|neg|pop) %[er]?([abcd][xlh]|si|di|bp|8|9|10|11|12|13|14|15)/ { trashed(get_reg()) }
-/cpuid/ { trashed("rax"); trashed("rbx"); trashed("rcx"); trashed("rdx") }
-
-END {
- if (in_function)
- print ".cfi_endproc"
-}
diff --git a/tools/lib.sh b/tools/lib.sh
new file mode 100644
index 00000000..0412d7c6
--- /dev/null
+++ b/tools/lib.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+assert_arg() {
+ if [ -z "$1" ]; then
+ printf 'Missing %s.\n\n' "$2" >&2
+ cat <<-'EOF'
+ usage >&2
+ exit 2
+ EOF
+ fi
+}
+
+uuid() {
+ od -xN20 /dev/urandom |
+ head -n1 |
+ awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}'
+}
+
+tmpname() {
+ echo "${TMPDIR:-/tmp}/uuid-tmpname with spaces.$(uuid)"
+}
+
+mkstemp() {
+ name="$(tmpname)"
+ touch "$name"
+ echo "$name"
+}
+
+mkdtemp() {
+ name="$(tmpname)"
+ mkdir "$name"
+ echo "$name"
+}
+
+END="\033[0m"
+yellow() {
+ YELLOW="\033[0;33m"
+ printf "${YELLOW}${1}${END}"
+}
+
+green() {
+ GREEN="\033[0;32m"
+ printf "${GREEN}${1}${END}"
+}
+
+red() {
+ RED="\033[0;31m"
+ printf "${RED}${1}${END}"
+}
diff --git a/tools/makehelp.sh b/tools/makehelp.sh
new file mode 100755
index 00000000..e6118de7
--- /dev/null
+++ b/tools/makehelp.sh
@@ -0,0 +1,149 @@
+#!/bin/sh
+set -eu
+
+. tools/lib.sh
+
+
+usage() {
+ cat <<-'EOF'
+ Usage:
+ makehelp.sh < MAKEFILE
+ makehelp.sh -h
+ EOF
+}
+
+help() {
+ cat <<-'EOF'
+
+
+ Options:
+ -h, --help show this message
+
+
+ Generate a help message from the given Makefile.
+
+ Any target or variable commented with two "#" characters gets
+ picked up. Multi-line comments are supported:
+
+ VAR1 = 1
+ # a comment
+ VAR2 = 2
+ ## another comment -> this one is included in the docs
+ VAR3 = 3
+
+ ## with a big
+ ## comment, which is also included
+ a-target:
+
+
+ Examples:
+
+ Generate help messages from "Makefile":
+
+ $ aux/makehelp.sh < Makefile
+
+
+ Generate help messages for all targets:
+
+ $ cat Makefile dev.mk | aux/makehelp.sh
+ EOF
+}
+
+
+for flag in "$@"; do
+ case "$flag" in
+ (--)
+ break
+ ;;
+ (--help)
+ usage
+ help
+ exit
+ ;;
+ (*)
+ ;;
+ esac
+done
+
+while getopts 'h' flag; do
+ case "$flag" in
+ (h)
+ usage
+ help
+ exit
+ ;;
+ (*)
+ usage >&2
+ exit 2
+ ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+
+TARGETS="$(mkstemp)"
+VARIABLES="$(mkstemp)"
+trap 'rm -f "$TARGETS" "$VARIABLES"' EXIT
+
+awk -vCOLUMN=15 -vTARGETS="$TARGETS" -vVARIABLES="$VARIABLES" '
+function indent(n, where) {
+ for (INDENT = 0; INDENT < n; INDENT++) {
+ printf " " > where
+ }
+}
+
+/^## / { doc[len++] = substr($0, 4) }
+
+/^[-_a-zA-Z]+:/ && len {
+ printf "\033[36m%s\033[0m", substr($1, 1, length($1) - 1) > TARGETS
+ for (i = 0; i < len; i++) {
+ n = COLUMN - (i == 0 ? length($1) - 1 : 0)
+ indent(n, TARGETS)
+ printf "%s\n", doc[i] > TARGETS
+ }
+ len = 0
+}
+
+/^.++=/ && len {
+ printf "\033[36m%s\033[0m", $1 > VARIABLES
+ for (i = 0; i < len; i++) {
+ n = COLUMN - (i == 0 ? length($1) : 0)
+ indent(n, VARIABLES)
+ printf "%s\n", doc[i] > VARIABLES
+ }
+ len = 0
+}'
+
+
+
+indent() {
+ sed 's|^| |'
+}
+
+cat <<-EOF
+ Usage:
+
+ make [VARIABLE=value...] [target...]
+
+
+ Targets:
+
+ $(indent < "$TARGETS")
+
+
+ Variables:
+
+ $(indent < "$VARIABLES")
+
+
+ Examples:
+
+ Build "all", the default target:
+
+ $ make
+
+
+ Test and install, with \$(DESTDIR) set to "tmp/":
+
+ $ make DESTDIR=tmp check install
+EOF
diff --git a/tools/manpages.sh b/tools/manpages.sh
new file mode 100755
index 00000000..755ff777
--- /dev/null
+++ b/tools/manpages.sh
@@ -0,0 +1,126 @@
+#!/bin/sh
+set -eu
+
+. tools/lib.sh
+
+
+usage() {
+ cat <<-'EOF'
+ Usage:
+ sh doc/manpages.sh -i|-u -p MANDIR FILE...
+ sh doc/manpages.sh -h
+ EOF
+}
+
+help() {
+ cat <<-'EOF'
+
+
+ Options:
+ -i set ACTION=install
+ -u set ACTION=uninstall
+ -p MANDIR use $MANDIR as the prefix directory
+ -h, --help show this message
+
+
+ Installs/uninstalls manpage files into MANDIR using the original
+ filename as a hint towards which subdirectory to pick: the
+ `prog.ru.1` file is installed under the `man1/` directory
+ hierarchy under the `ru/` language folder. When then language
+ is `en`, a the toplevel `man1/` gets a symlink to the `en/`
+ language folder:
+
+ man/
+ en/
+ man1/
+ prog.1
+ ru/
+ man1/
+ prog.1
+ man1/
+ prog.1 -> ../en/man1/prog.1
+
+
+ Examples:
+
+ Install prog.en.1 under `/usr/man`:
+
+ $ sh doc/manpages.sh -ip/usr/man prog.en.1
+
+
+ Uninstall all files listed under doc/ from `$PREFIX`:
+
+ sh doc/manpages.sh -up "$PREFIX" doc/*.[0-9]
+ EOF
+}
+
+
+for flag in "$@"; do
+ case "$flag" in
+ (--)
+ break
+ ;;
+ (--help)
+ usage
+ help
+ exit
+ ;;
+ (*)
+ ;;
+ esac
+done
+
+while getopts 'iup:h' flag; do
+ case "$flag" in
+ (i)
+ ACTION=install
+ ;;
+ (u)
+ ACTION=uninstall
+ ;;
+ (p)
+ MANDIR="$OPTARG"
+ ;;
+ (h)
+ usage
+ help
+ exit
+ ;;
+ (*)
+ usage >&2
+ exit 2
+ ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+eval "$(assert_arg "${ACTION:-}" '-[iu] for choosing action')"
+eval "$(assert_arg "${MANDIR:-}" '-p MANDIR')"
+eval "$(assert_arg "${1:-}" 'FILE...')"
+
+
+for f in "$@"; do
+ l="$(echo "$f" | awk -F. '{print $(NF-1)}')"
+ n="$(echo "$f" | awk -F. '{print $NF}')"
+ case "$ACTION" in
+ (install)
+ to_name="$(basename "${f%."$l"."$n"}.$n")"
+ mkdir -p "$MANDIR/$l/man$n" "$MANDIR/man$n"
+ cp "$f" "$MANDIR/$l/man$n/$to_name"
+ if [ "$l" = 'en' ]; then
+ ln -fs "../en/man$n/$to_name" \
+ "$MANDIR/man$n/$to_name"
+ fi
+ ;;
+ (uninstall)
+ to_name="$(basename "${f%."$l"."$n"}.$n")"
+ rm -f \
+ "$MANDIR/$l/man$n/$to_name" \
+ "$MANDIR/man$n/$to_name"
+ ;;
+ (*)
+ echo "Bad ACTION: $ACTION"
+ exit 1
+ ;;
+ esac
+done
diff --git a/tools/mkalltypes.sed b/tools/mkalltypes.sed
deleted file mode 100644
index fa15efc3..00000000
--- a/tools/mkalltypes.sed
+++ /dev/null
@@ -1,15 +0,0 @@
-/^TYPEDEF/s/TYPEDEF \(.*\) \([^ ]*\);$/#if defined(__NEED_\2) \&\& !defined(__DEFINED_\2)\
-typedef \1 \2;\
-#define __DEFINED_\2\
-#endif\
-/
-/^STRUCT/s/STRUCT * \([^ ]*\) \(.*\);$/#if defined(__NEED_struct_\1) \&\& !defined(__DEFINED_struct_\1)\
-struct \1 \2;\
-#define __DEFINED_struct_\1\
-#endif\
-/
-/^UNION/s/UNION * \([^ ]*\) \(.*\);$/#if defined(__NEED_union_\1) \&\& !defined(__DEFINED_union_\1)\
-union \1 \2;\
-#define __DEFINED_union_\1\
-#endif\
-/