summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-15 20:49:36 +0100
committersalmonik <salmonik@tuta.io>2026-11-15 20:49:36 +0100
commit836cf9a5a7fbbd81638e51c3ea4eb976f55506d7 (patch)
treef47e47c4c2da7efed10e89df2b9145b5fb7285aa /README.md
parent0.8.0: comp.sh reports how to build for the machine it runs on (diff)
downloadagent686-836cf9a5a7fbbd81638e51c3ea4eb976f55506d7.tar.gz
agent686-836cf9a5a7fbbd81638e51c3ea4eb976f55506d7.zip
0.8.2: comp.sh defaults to this CPU, --portable for travel
- default build uses -C target-cpu=native, with the portable command printed alongside and the SIGILL consequence stated - fix x86-64 level detection: /proc/cpuinfo has 'abm' not 'lzcnt', and never 'osxsave', so a v3 CPU was reported as v2 - --old-glibc recipe carries the same CPU choice
Diffstat (limited to '')
-rw-r--r--README.md22
1 files changed, 14 insertions, 8 deletions
diff --git a/README.md b/README.md
index 1b070e5..056e771 100644
--- a/README.md
+++ b/README.md
@@ -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
25target triple, and the `cfg` values the code will see. A native glibc build 26CPU, the target triple, and the `cfg` values the code will see. By default it
26inherits this machine's glibc floor, which is why the portable paths are printed 27targets **this CPU** (`-C target-cpu=native`), which is the right build when the
27next to it: static musl removes the floor entirely, and building inside an older 28binary runs here; `--portable` targets the architecture floor instead. If the
28Debian image lowers it. 29binary 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
32A glibc build also inherits this machine's glibc floor, which is why the portable
33paths are printed next to it: static musl removes the floor entirely, and building
34inside an older Debian image lowers it.
29 35
30The gate matters: the dev host's glibc is newer than the target's, so a 36The gate matters: the dev host's glibc is newer than the target's, so a
31dependency can silently raise the required symbol version. 37dependency can silently raise the required symbol version.