From 45d0d3c5f431688aa9dfbd6a4214256d6fe64122 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 18 Nov 2026 12:34:33 +0100 Subject: 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 --- comp.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'comp.sh') diff --git a/comp.sh b/comp.sh index 8539c2d..af11720 100755 --- a/comp.sh +++ b/comp.sh @@ -157,12 +157,15 @@ build_flags() { esac } -# i686-gnu needs linker flags from .cargo/config.toml. RUSTFLAGS on the command -# line would shadow them, so repeat them. +# gnu targets need linker flags from .cargo/config.toml (a weak GLIBC_2.39 +# reference would warn on older glibc). RUSTFLAGS on the command line would +# shadow them, so repeat them here. defsym_flag= -if [ "$triple_gnu" = i686-unknown-linux-gnu ]; then - defsym_flag="-C link-arg=-Wl,--defsym,pidfd_spawnp=0 -C link-arg=-Wl,--defsym,pidfd_getpid=0" -fi +case "$triple_gnu" in + *-unknown-linux-gnu) + defsym_flag="-C link-arg=-Wl,--defsym,pidfd_spawnp=0 -C link-arg=-Wl,--defsym,pidfd_getpid=0" + ;; +esac # ---------------------------------------------------------------- report @@ -217,7 +220,9 @@ if [ "$plan" = native ] || [ "$plan" = musl ]; then [ "$plan" = musl ] && triple=$triple_musl flags=$(build_flags) - [ "$triple" = i686-unknown-linux-gnu ] && flags="$flags $defsym_flag" + case "$triple" in + *-unknown-linux-gnu) flags="$flags $defsym_flag" ;; + esac if [ "$cpu" = native ]; then say " # for this CPU${cpu_level:+ (x86-64-$cpu_level)}" @@ -289,7 +294,9 @@ if [ "$run" -eq 1 ]; then triple=$native_triple [ "$plan" = musl ] && triple=$triple_musl flags=$(build_flags) - [ "$triple" = i686-unknown-linux-gnu ] && flags="$flags $defsym_flag" + case "$triple" in + *-unknown-linux-gnu) flags="$flags $defsym_flag" ;; + esac section "building" rustup target add "$triple" >/dev/null 2>&1 || true -- cgit v1.2.3