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).
44 lines
1.1 KiB
Markdown
44 lines
1.1 KiB
Markdown
# Install methods
|
|
|
|
vlibc has two install methods, selected with `--with-install=`.
|
|
|
|
## Alongside (default)
|
|
|
|
```sh
|
|
./autogen.sh --with-install=alongside
|
|
make
|
|
make install
|
|
```
|
|
|
|
- Does **not** replace the system libc.
|
|
- Installs headers and libraries under a vlibc-specific tree:
|
|
`$prefix/lib/vlibc/include` and `$prefix/lib/vlibc/lib`.
|
|
- Consuming projects use the shipped drivers:
|
|
|
|
```sh
|
|
vlibc-gcc -o app app.c # GCC backend
|
|
vlibc-clang -o app app.c # Clang backend
|
|
```
|
|
|
|
## Overwrite
|
|
|
|
```sh
|
|
./autogen.sh --with-install=overwrite
|
|
make
|
|
make install
|
|
```
|
|
|
|
- Replaces the system libc in place: headers go to `$prefix/include`, libraries
|
|
to `$prefix/lib`.
|
|
- The shipped drivers then use the system include/lib paths directly.
|
|
|
|
## Compiler drivers
|
|
|
|
`vlibc-gcc` and `vlibc-clang` are thin wrappers generated by `configure`. They
|
|
add vlibc's include and library paths (according to the install method) and
|
|
delegate to `gcc` / `clang`.
|
|
|
|
> **Note:** the drivers are currently stubs. Full sysroot handling for
|
|
> `overwrite` installs and cross-compilation, and the `-static`/`-lvlibc`
|
|
> wiring, are added as the library's ABI matures.
|