Commit Graph
17 Commits
Author SHA1 Message Date
huntedbytheirs e3017cfe56 test(errno): make test_strerror self-contained under -Iinclude 2026-09-03 18:26:48 -04:00
huntedbytheirs b2d588885e feat(setjmp): x86_64 setjmp/longjmp/sigsetjmp 2026-09-03 17:39:20 -04:00
huntedbytheirs dec1017527 feat(headers): stddef/stdint/stdbool/limits/float/assert + features wiring 2026-09-03 17:34:16 -04:00
huntedbytheirs ce517ad0d6 feat(errno): public errno.h with strerror/strerror_r 2026-09-03 17:20:24 -04:00
huntedbytheirs c5a77c61fa feat(syscall): add x86_64 raw syscall layer, errno, internal ABI headers 2026-09-03 17:10:27 -04:00
huntedbytheirsandSisyphus 6854c7771d style(string): satisfy clang-tidy and clang-format for final-wave gate
Suppress clang-analyzer-security buffer-handling diagnostics on the
plan-mandated __builtin_memcpy word loads and bugprone swappable-
parameter diagnostics on the C-standard signatures; wrap the autoconf
substitution tokens in clang-format off/on (the space clang-format wants
before the closing @ would break config.status substitution).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 21:34:25 -04:00
huntedbytheirsandSisyphus 53c8531eab bench(string): add bench_string.c vs glibc/musl
System-headers-only harness timing the five L1 string functions
(strlen, strcmp, memcpy, memmove, memset) at 8- and 64-byte inputs.
Calls go through volatile function pointers to defeat builtin
substitution and LICM hoisting; correctness self-asserts route through
the same pointers. Prints FUNC@SIZE ns/call lines.

bench_string uses empty per-target CPPFLAGS (no -I include) so it links
against whichever libc --with-libc= selects; the bench target runs it
always and bench_vlibc only under BENCH_LINK_VLIBC. Both programs
relink when config.status changes, so a reconfigure cannot silently
reuse a binary from the previous libc.

Measured vs glibc 2.44 (median of 3 runs): mem* 1.0-3.3x,
strlen/strcmp 3.2-3.9x — word-at-a-time vs AVX2, all sane.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 21:28:04 -04:00
huntedbytheirsandSisyphus e8fe84e27c feat(string): add GNU strcasestr at level 3
Case-insensitive ASCII-fold substring search, locale-free, no
allocation.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 21:14:52 -04:00
huntedbytheirsandSisyphus d5e390e992 feat(string): add BSD strlcpy/strlcat at level 2
Exact OpenBSD semantics: strlcpy returns strlen(src) and writes at most
size-1 bytes plus NUL; strlcat returns dlen + strlen(src) with
dlen = min(size, strlen(dst)) and never reads past size bytes in dst.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 21:14:52 -04:00
huntedbytheirsandSisyphus d23deaa32a feat(string): implement core string/memory functions (level 1)
Word-at-a-time memcpy/memmove/memset/strlen/strcmp implementing the
level-1 string slice. memcpy carries an optimize(no-tree-loop-
distribute-patterns) attribute: GCC's loop-distribution pass rewrites
its word-copy loop into a self-recursive memcpy@plt call at -O2/-O3
otherwise.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 21:14:49 -04:00
huntedbytheirsandSisyphus 7d28d7cc9d build(profile): select sources per level via AM_CONDITIONAL
Gate the initial string slice per compatibility level: L1 sources compile
everywhere, strlcpy/strlcat only at level >= 2 (PROFILE_GE_2), strcasestr
only at level >= 3 (PROFILE_GE_3). Install the generated
include/vlibc/features.h under $(vlibc_includedir)/vlibc/ via a dedicated
vlibc_featuresdir primary (nodist_nobase is rejected by automake and loses
the vlibc/ subpath). Include stddef.h/string.h in vlibc_include_HEADERS.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 20:54:00 -04:00
huntedbytheirsandSisyphus ace9728565 feat(profile): add stddef.h and profile-gated string.h
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 19:57:21 -04:00
huntedbytheirsandSisyphus 060fc03ab7 docs(profile): document gating mechanism, classification rule, slice manifest
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 19:54:40 -04:00
huntedbytheirsandSisyphus f07b270675 chore(build): regenerate configure from configure.ac
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 19:51:50 -04:00
huntedbytheirsandSisyphus a5c16e97d7 feat(profile): generate installed features.h exposing VLIBC_LEVEL
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 19:49:49 -04:00
huntedbytheirs 180c1107b6 Add vlibc scaffold, build system, and documentation
Establish the repository layout per Vox guidelines (layouts/C.md,
building/C.md): Autotools build (GCC-only, C23), five compatibility
profiles (--enable-onlyposix/--enable-muslmimic/--enable-muslext/
--enable-spoof, default vlibc), alongside/overwrite install methods,
vlibc-gcc/vlibc-clang drivers, static-linking requirement (except
spoof), benchmark harness, and tooling (.clang-format/.clang-tidy/
.clangd + compile_commands.json).
2026-08-31 17:06:01 -04:00
huntedbytheirs 3f63ae1cdd Initial commit 2026-08-31 16:40:34 -04:00