!UNVBThoJtlIiVwiDjU:nixos.org

Staging

286 Members
Staging merges | Running staging cycles: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Astaging-next+head%3Astaging-next-25.05 | Review Reports: https://malob.github.io/nix-review-tools-reports/99 Servers

Load older messages


SenderMessageTime
14 Sep 2025
@emilazy:matrix.orgemilywait no14:24:56
@emilazy:matrix.orgemilyhttps://github.com/golang/go/blob/ac803b5949f6dbc5bfa559afe506d35f9e1b3195/src/cmd/link/internal/ld/config.go#L19214:24:58
@emilazy:matrix.orgemilywe're good14:24:59
@emilazy:matrix.orgemily Lun: ok here's my proposal: drop GO_LDSO from src/internal/buildcfg/cfg.go, add func Getgoldso() string that returns envOr("GO_LDSO", defaultGO_LDSO). adjust src/cmd/link/internal/ld/elf.go appropriately 14:27:07
@emilazy:matrix.orgemily although I am not sure if the buildcfg.GOOS == runtime.GOOS && buildcfg.GOARCH == runtime.GOARCH makes sense there if the environment variable is set 14:27:29
@emilazy:matrix.orgemilylet me check if any other thing uses that14:27:38
@emilazy:matrix.orgemilyok, nothing else uses that14:27:42
@emilazy:matrix.orgemily revised proposal: drop GO_LDSO, but don't introduce the function, instead change the conditional to like 14:27:55
@emilazy:matrix.orgemily (I wish I knew where interperter was defined) 14:28:26
@lt1379:matrix.orgLunvar block in src/cmd/link/internal/ld/lib.go?14:28:49
@emilazy:matrix.orgemilyhow did you do that…14:29:01
@emilazy:matrix.orgemily okay, so it has an -I argument for specifying the interpreter anyway. so I have to… find where Go is calling into this 14:30:19
@emilazy:matrix.orgemilyI don't suppose your magic Go code tracing powers are strong enough for that14:30:54
@emilazy:matrix.orgemilyoh I found it I think14:31:25
@emilazy:matrix.orgemily
	if err := BuildToolchain.ld(b, a, a.Target, importcfg, a.Deps[0].built); err != nil {
14:36:43
@emilazy:matrix.orgemily what do you mean b, a 14:36:46
@emilazy:matrix.orgemilyok screw it14:38:12
@emilazy:matrix.orgemily Lun: my idea is drop GO_LDSO from src/internal/buildcfg/cfg.go, export defaultGO_LDSO in… wherever it's defined, and then in src/internal/buildcfg/cfg.go, do if interpreter == "" { if getenv GO_LDSO { use it } else if buildcfg.GOOS == runtime.GOOS && buildcfg.GOARCH == runtime.GOARCH && DefaultGO_LDSO != "" { use it } } 14:39:48
@emilazy:matrix.orgemily and then export GO_LDSO=$(cat $NIX_CC/nix-support/dynamic-linker) iff that exists (it won't on e.g. Darwin) in both the Go build itself and in whatever Bash we run for all Go builds 14:40:26
@emilazy:matrix.orgemilydoes that sound sensible? I think it's at least close to an upstreamable shape14:40:32
@emilazy:matrix.orgemily and then the only non-upstream patch we need is ^, DefaultPIE always true except for explicit carve-outs for Linux/PPC64 and Windows + race checker 14:41:00
@emilazy:matrix.orgemily and then -linkmode=internal should work 14:41:16
@emilazy:matrix.orgemilystatic PIE would still need the "force external linking" thing figured out, but that's out of scope for current work14:41:27
@emilazy:matrix.orgemily(I do want static PIEs though)14:41:32
@emilazy:matrix.orgemily(but it's a whole nother yak shave)14:41:41
@lt1379:matrix.orgLun

export defaultGO_LDSO in… wherever it's defined,
isn't that a mass rename?

14:42:53
@lt1379:matrix.orgLun *

export defaultGO_LDSO in… wherever it's defined,

isn't that a mass rename?

14:42:57
@lt1379:matrix.orgLunno it's only in 2 places14:43:34
@emilazy:matrix.orgemilyit's not exported anyway14:44:48
@emilazy:matrix.orgemilybecause it starts with a lowercase letter14:44:51

Show newer messages


Back to Room ListRoom Version: 6