!UNVBThoJtlIiVwiDjU:nixos.org

Staging

294 Members
Staging merges | Find currently open staging-next PRs: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+sort%3Aupdated-desc+head%3Astaging-next+head%3Astaging-next-21.05+is%3Aopen102 Servers

Load older messages


SenderMessageTime
14 Sep 2025
@emilazy:matrix.orgemilythat's how you can tell14:44:54
@emilazy:matrix.orgemily GO_LDSO is, because it starts with a capital letter 14:45:11
@emilazy:matrix.orgemilybut yeah exactly one use site, so it's fine to drop it in favour of exporting the default14:45:17
@emilazy:matrix.orgemilyall this implicit stuff drives me crazy14:45:53
@emilazy:matrix.orgemilyit'd be so easy to trace the logic if you could see where every imported definition came from14:46:04
@emilazy:matrix.orgemilywait14:47:19
@emilazy:matrix.orgemily why the hell does it condition on GO_LDSO != "" 14:47:24
@emilazy:matrix.orgemily
		if interpreter == "" && buildcfg.GOOS == runtime.GOOS && buildcfg.GOARCH == runtime.GOARCH && buildcfg.GO_LDSO != "" {
			interpreter = buildcfg.GO_LDSO
		}
14:47:29
@emilazy:matrix.orgemilyit's literally a nop if it is14:47:31
@emilazy:matrix.orgemilywonderful codebase 10/1014:47:50
@aloisw:julia0815.dealoisw
In reply to @emilazy:matrix.org
teaching the internal linker to do the right thing does seem like a good idea if it's only a matter of helping it find the interpreter. I interpreted aloisw as saying there was more of an obstacle, but if there's not then that is probably a good path. I think we need to do it at runtime because it can depend on $NIX_CC but it might be easy enough
Well that -I PR basically is trying to tell the internal linker to do the right thing.
15:00:31
@emilazy:matrix.orgemily there's an -I PR? 15:00:56
@emilazy:matrix.orgemilyI have not seen any such PR15:00:59
@emilazy:matrix.orgemilyso that is probably the context I have been missing15:01:06
@aloisw:julia0815.dealoisw The one I authored that passes -I via ldflags but doesn't bother passing ldflags via GOFLAGS. I'm not saying it's perfect, there are different obstacles compared to the current way. 15:02:33
@emilazy:matrix.orgemily ah, https://github.com/NixOS/nixpkgs/pull/421003? 15:03:07
@emilazy:matrix.orgemilyyes I had never seen this before15:03:09
@emilazy:matrix.orgemily I think that the GO_LDSO patch is probably the way to go 15:03:23
@emilazy:matrix.orgemilyit will work for builds doing weird nested stuff and seems upstreamable15:03:33
@lt1379:matrix.orgLunWhat does changing around GO_LDSO → DefaultGO_LDSO achieve? I feel like I must have interpreted what you said wrong looking at the diff https://gist.github.com/LunNova/3c77fc924f1f7343ff190d6af09334fc15:03:51
@emilazy:matrix.orgemily and then the "DefaultPIE by default" patch is very lightweight and only not upstreamable because upstream presumably doesn't agree with our desires 15:03:52
@emilazy:matrix.orgemily when something can be used at both runtime and compile-time, they don't define GO_FOO but instead have functions doing things like envOr("GO_FOO", defaultGO_FOO) 15:04:44
@emilazy:matrix.orgemily so if we have a runtime GO_LDSO, having a variable called GO_LDSO that might not be the runtime one is misleading 15:04:54
@aloisw:julia0815.dealoisw
In reply to @emilazy:matrix.org
ah, https://github.com/NixOS/nixpkgs/pull/421003?
I posted it some days back and you asked why GOFLAGS was not done.
15:04:59
@lt1379:matrix.orgLunah so that's with intent to upstream rather than minimizing a patch to carry15:05:11
@emilazy:matrix.orgemily I missed the link. me talking about GOFLAGS wasn't in reaction to this PR 15:05:18
@lt1379:matrix.orgLun* ah so that's with intent to upstream and follow conventions rather than minimizing a patch to carry15:05:19
@emilazy:matrix.orgemily it was in reaction to looking at the existing ldflags stuff in the Go build machinery 15:05:28
@emilazy:matrix.orgemilysorry for missing the link :(15:05:33
@emilazy:matrix.orgemilyI would have been a lot less confused if I had seen it15:05:42

Show newer messages


Back to Room ListRoom Version: 6