diff options
Diffstat (limited to '')
| -rw-r--r-- | README.md | 22 |
1 files changed, 14 insertions, 8 deletions
| @@ -15,17 +15,23 @@ and it builds for whatever machine you are on. | |||
| 15 | ## Build | 15 | ## Build |
| 16 | 16 | ||
| 17 | ```sh | 17 | ```sh |
| 18 | ./comp.sh # detect this machine, print the exact build plan | 18 | ./comp.sh # plan tuned for this CPU (the default) |
| 19 | ./comp.sh --run # build it, then run the glibc gate | 19 | ./comp.sh --portable # plan for any 64-bit CPU (x86-64 / SSE2) |
| 20 | ./comp.sh --run # build here, then run the glibc gate | ||
| 20 | ./comp.sh --musl --run # static build: runs on Debian 10 and anything newer | 21 | ./comp.sh --musl --run # static build: runs on Debian 10 and anything newer |
| 21 | ./comp.sh --old-glibc # recipe for building against an older glibc | 22 | ./comp.sh --old-glibc # container recipe for an older glibc |
| 22 | ``` | 23 | ``` |
| 23 | 24 | ||
| 24 | `comp.sh` reports the distro, libc and glibc version, the CPU baseline, the | 25 | `comp.sh` reports the distro, libc and glibc version, the x86-64 level of this |
| 25 | target triple, and the `cfg` values the code will see. A native glibc build | 26 | CPU, the target triple, and the `cfg` values the code will see. By default it |
| 26 | inherits this machine's glibc floor, which is why the portable paths are printed | 27 | targets **this CPU** (`-C target-cpu=native`), which is the right build when the |
| 27 | next to it: static musl removes the floor entirely, and building inside an older | 28 | binary runs here; `--portable` targets the architecture floor instead. If the |
| 28 | Debian image lowers it. | 29 | binary is for another machine, use `--portable` or run `comp.sh` on that machine |
| 30 | — a native build fails with an illegal instruction on older chips. | ||
| 31 | |||
| 32 | A glibc build also inherits this machine's glibc floor, which is why the portable | ||
| 33 | paths are printed next to it: static musl removes the floor entirely, and building | ||
| 34 | inside an older Debian image lowers it. | ||
| 29 | 35 | ||
| 30 | The gate matters: the dev host's glibc is newer than the target's, so a | 36 | The gate matters: the dev host's glibc is newer than the target's, so a |
| 31 | dependency can silently raise the required symbol version. | 37 | dependency can silently raise the required symbol version. |
