raz / commit 8ac34c12

commit
8ac34c12c3679d2d2602afe2a70f9f53b2567ca6
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
460315e4
CI runs test/libc over musl, cabi with musl-gcc, and make alpine; CLAUDE.md

CLAUDE.md: make alpine, test/libc over musl and cabi's comparison,
the C library's choice, Sys.raz and CAbi kept to the seed's language,
and Sys's errnos Linux's everywhere.

patch · log

2 files changed, +16 -3

.github/workflows/ci.yml (history) modified +3 -1

@@ -23,8 +23,10 @@
2323 with:
2424 ref: ${{ inputs.tag || github.ref }}
2525 fetch-depth: 0 # git describe needs the tags
26- - run: sudo apt-get update && sudo apt-get install -y fp-compiler
26+ # musl and musl-tools: test/libc over musl, and cabi with musl-gcc
27+ - run: sudo apt-get update && sudo apt-get install -y fp-compiler musl musl-tools
2728 - run: make check
29+ - run: make alpine
2830 - name: release
2931 if: env.TAG != ''
3032 env:

CLAUDE.md modified +13 -2

@@ -19,6 +19,7 @@
1919 make fixpoint # the seed builds src, that builds src, that again: the last two agree
2020 make gdb # gdb stops at a line of a test and names it
2121 make stress # 40,000 native threads; make check runs a small version
22+ make alpine # test/libc in an Alpine container, over musl (docker)
2223 make fmt # lib/, examples/ and tools/ are formatted
2324 make install # raz on PATH via ~/.local (PREFIX=...); make uninstall
2425
@@ -134,7 +135,11 @@
134135 0.7.1 on.
135136
136137 `test/libc` runs its programs over `lib/Sys.raz`, the C one, through
137-a link in its `mods`. A test or example without `.expect` is only
138+a link in its `mods`; `make check` runs them again with `-libc musl`
139+where musl's loader is installed (`apt-get install -y musl
140+musl-tools`), and compares `tools/cabi.c`'s output, with `cc` and
141+`musl-gcc`, with `lib/CAbi.linux-x86_64.raz`, which is never edited
142+by hand. A test or example without `.expect` is only
138143 compiled (`examples/Window.raz` needs a display).
139144
140145 ## The compiler and the seed
@@ -183,7 +188,13 @@
183188 code. Its arguments are read then, in the scope there.
184189 - A program uses C if a module it uses (not one read only for an
185190 interface check) has an `extern` or a `link` of a library. `static`
186- in `link static;` is not a reserved word.
191+ in `link static;` is not a reserved word. It is linked against
192+ glibc, or musl (`/lib/ld-musl-x86_64.so.1`, needing `libc.so`) by
193+ `-libc musl` or on a machine with musl's loader and not glibc's.
194+ `lib/Sys.raz` and `CAbi` are read by the seed for the interface
195+ check, so they keep to the seed's language.
196+- `Sys` gives minus Linux's errnos on every target; `Sys.raz` maps the
197+ C library's through `CAbi.errnos`.
187198 - C symbols are reached through quadwords the loader fills in
188199 (GLOB_DAT), with no PLT; the executable exports nothing. In a C
189200 program the entry point stores C's `exit` in `Rt.cExit`, found by