| | @@ -19,6 +19,7 @@ |
| 19 | 19 | make fixpoint # the seed builds src, that builds src, that again: the last two agree |
| 20 | 20 | make gdb # gdb stops at a line of a test and names it |
| 21 | 21 | make stress # 40,000 native threads; make check runs a small version |
| 22 | + make alpine # test/libc in an Alpine container, over musl (docker) |
| 22 | 23 | make fmt # lib/, examples/ and tools/ are formatted |
| 23 | 24 | make install # raz on PATH via ~/.local (PREFIX=...); make uninstall |
| 24 | 25 | |
| | @@ -134,7 +135,11 @@ |
| 134 | 135 | 0.7.1 on. |
| 135 | 136 | |
| 136 | 137 | `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 |
| 138 | 143 | compiled (`examples/Window.raz` needs a display). |
| 139 | 144 | |
| 140 | 145 | ## The compiler and the seed |
| | @@ -183,7 +188,13 @@ |
| 183 | 188 | code. Its arguments are read then, in the scope there. |
| 184 | 189 | - A program uses C if a module it uses (not one read only for an |
| 185 | 190 | 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`. |
| 187 | 198 | - C symbols are reached through quadwords the loader fills in |
| 188 | 199 | (GLOB_DAT), with no PLT; the executable exports nothing. In a C |
| 189 | 200 | program the entry point stores C's `exit` in `Rt.cExit`, found by |