13 Sep 2025 |
emily | this is going to produce probably the exact bootstrapping unhappiness you saw | 19:53:19 |
emily | (what a pain huh) | 19:54:34 |
emily | (bootstrapping…) | 19:54:36 |
emily | anyway I think if you just make that conditional match it should go through | 19:59:32 |
emily | hopefully! | 19:59:35 |
emily | also wait | 19:59:57 |
emily | case "ppc64":
// Big Endian PPC64 cgo internal linking is not implemented for aix or linux.
if goos == "aix" || goos == "linux" {
| 20:00:00 |
emily | I thought it was external linking that was broken??? | 20:00:04 |
emily | oh right because cgo is just broken there | 20:00:13 |
emily | fun | 20:00:14 |
emily | omg they have three copies of MustLinkExternal | 20:01:15 |
emily | awesome | 20:01:20 |
emily | I do wonder if this means that CGO_ENABLED=0 will end up broken. blah sorry I must resist the temptation to clone the Go code and start writing my own patch | 20:02:19 |
emily | I can review whatever you come up with and whatever problems it runs into | 20:02:33 |
emily | aloisw: btw is there any reason we couldn't just teach Go about our dynamic linker path… | 20:03:26 |
emily | https://github.com/search?q=repo%3Agolang%2Fgo%20linuxdynld&type=code | 20:03:48 |
emily | I guess we'd have to make it runtime-dynamic which would be annoying | 20:03:59 |
14 Sep 2025 |
| Emma [it/its] joined the room. | 08:40:01 |
emily | Lun: sorry for sending you on rob pike's wild ride :) | 14:06:34 |
emily | 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 | 14:07:25 |
emily | I think we'd still need to use the external linker to get static PIEs working, but that's Future Work | 14:07:38 |
emily | btw, we should not make it Linux-specific in DefaultPIE , since the GCC setting isn't. we should just keep the one explicit Windows + isRace carveout there, probably add the PPC64 one, and otherwise make it true | 14:08:55 |
emily | so wait did you solve the bootstrapping issue? | 14:09:02 |
Lun | I'm not sure solve is the right word but it bootstraps | 14:10:09 |
emily | I can't tell what actually changed in the diff :) | 14:10:23 |
emily | btw it's so disappointing that Go makes a point about being multi-target and then has things like if interpreter == "" && buildcfg.GOOS == runtime.GOOS && buildcfg.GOARCH == runtime.GOARCH && buildcfg.GO_LDSO != "" { | 14:10:40 |
emily | so you just can't make it do the right thing for cross | 14:10:44 |
emily | more software engineering please 😔 | 14:10:59 |
Lun | https://github.com/LunNova/nixpkgs/activity?ref=lunnova/drop-pie-hardening-flag should have the diffs somewhere | 14:11:42 |
emily |  Download image.png | 14:12:32 |