aboutsummaryrefslogtreecommitdiffstats
path: root/comp.sh
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-18 12:34:33 +0100
committersalmonik <salmonik@tuta.io>2026-11-18 12:34:33 +0100
commit45d0d3c5f431688aa9dfbd6a4214256d6fe64122 (patch)
tree862ca7949b0e6c1c8084f2fe7431bfa56364d8fc /comp.sh
parent0.9.1: correctness fixes from the audit (diff)
downloadagent686-45d0d3c5f431688aa9dfbd6a4214256d6fe64122.tar.gz
agent686-45d0d3c5f431688aa9dfbd6a4214256d6fe64122.zip
0.9.2: doc accuracy and UX fixes from the review
- missing key exits 1, consistent with --doctor - HTML error bodies get a one-line message - no unapprovable diff printed on a non-terminal - weak GLIBC_2.39 fix covers x86_64 gnu as well as i686 - README/PLAN/CHANGELOG brought in line with the actual binary
Diffstat (limited to '')
-rwxr-xr-xcomp.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/comp.sh b/comp.sh
index 8539c2d..af11720 100755
--- a/comp.sh
+++ b/comp.sh
@@ -157,12 +157,15 @@ build_flags() {
157 esac 157 esac
158} 158}
159 159
160# i686-gnu needs linker flags from .cargo/config.toml. RUSTFLAGS on the command 160# gnu targets need linker flags from .cargo/config.toml (a weak GLIBC_2.39
161# line would shadow them, so repeat them. 161# reference would warn on older glibc). RUSTFLAGS on the command line would
162# shadow them, so repeat them here.
162defsym_flag= 163defsym_flag=
163if [ "$triple_gnu" = i686-unknown-linux-gnu ]; then 164case "$triple_gnu" in
164 defsym_flag="-C link-arg=-Wl,--defsym,pidfd_spawnp=0 -C link-arg=-Wl,--defsym,pidfd_getpid=0" 165 *-unknown-linux-gnu)
165fi 166 defsym_flag="-C link-arg=-Wl,--defsym,pidfd_spawnp=0 -C link-arg=-Wl,--defsym,pidfd_getpid=0"
167 ;;
168esac
166 169
167# ---------------------------------------------------------------- report 170# ---------------------------------------------------------------- report
168 171
@@ -217,7 +220,9 @@ if [ "$plan" = native ] || [ "$plan" = musl ]; then
217 [ "$plan" = musl ] && triple=$triple_musl 220 [ "$plan" = musl ] && triple=$triple_musl
218 221
219 flags=$(build_flags) 222 flags=$(build_flags)
220 [ "$triple" = i686-unknown-linux-gnu ] && flags="$flags $defsym_flag" 223 case "$triple" in
224 *-unknown-linux-gnu) flags="$flags $defsym_flag" ;;
225 esac
221 226
222 if [ "$cpu" = native ]; then 227 if [ "$cpu" = native ]; then
223 say " # for this CPU${cpu_level:+ (x86-64-$cpu_level)}" 228 say " # for this CPU${cpu_level:+ (x86-64-$cpu_level)}"
@@ -289,7 +294,9 @@ if [ "$run" -eq 1 ]; then
289 triple=$native_triple 294 triple=$native_triple
290 [ "$plan" = musl ] && triple=$triple_musl 295 [ "$plan" = musl ] && triple=$triple_musl
291 flags=$(build_flags) 296 flags=$(build_flags)
292 [ "$triple" = i686-unknown-linux-gnu ] && flags="$flags $defsym_flag" 297 case "$triple" in
298 *-unknown-linux-gnu) flags="$flags $defsym_flag" ;;
299 esac
293 300
294 section "building" 301 section "building"
295 rustup target add "$triple" >/dev/null 2>&1 || true 302 rustup target add "$triple" >/dev/null 2>&1 || true