From 836cf9a5a7fbbd81638e51c3ea4eb976f55506d7 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 15 Nov 2026 20:49:36 +0100 Subject: 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 --- README.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'README.md') 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. ## Build ```sh -./comp.sh # detect this machine, print the exact build plan -./comp.sh --run # build it, then run the glibc gate +./comp.sh # plan tuned for this CPU (the default) +./comp.sh --portable # plan for any 64-bit CPU (x86-64 / SSE2) +./comp.sh --run # build here, then run the glibc gate ./comp.sh --musl --run # static build: runs on Debian 10 and anything newer -./comp.sh --old-glibc # recipe for building against an older glibc +./comp.sh --old-glibc # container recipe for an older glibc ``` -`comp.sh` reports the distro, libc and glibc version, the CPU baseline, the -target triple, and the `cfg` values the code will see. A native glibc build -inherits this machine's glibc floor, which is why the portable paths are printed -next to it: static musl removes the floor entirely, and building inside an older -Debian image lowers it. +`comp.sh` reports the distro, libc and glibc version, the x86-64 level of this +CPU, the target triple, and the `cfg` values the code will see. By default it +targets **this CPU** (`-C target-cpu=native`), which is the right build when the +binary runs here; `--portable` targets the architecture floor instead. If the +binary is for another machine, use `--portable` or run `comp.sh` on that machine +— a native build fails with an illegal instruction on older chips. + +A glibc build also inherits this machine's glibc floor, which is why the portable +paths are printed next to it: static musl removes the floor entirely, and building +inside an older Debian image lowers it. The gate matters: the dev host's glibc is newer than the target's, so a dependency can silently raise the required symbol version. -- cgit v1.2.3