14 Sep 2025 |
emily | and one for a non-CGO_ENABLED = 0; package | 16:58:45 |
emily | I guess just a test that matrixes over {pkgs, pkgsStatic} × {skopeo, clickhouse-backup} and checks "if pkgsStatic , then it's a static non-PIE, otherwise it's a dynamic PIE, and the interpreter is correct" would be ideal | 16:59:49 |
emily | could you split up the go-default-pie.patch patch into "support $GO_LDSO " + "PIE by default" too? since the former is more upstreamable than the latter | 17:00:13 |
emily | the && buildcfg.DefaultGO_LDSO != "" is strictly redundant fwiw :) but it was redundant before too I suppose | 17:00:31 |
emily | LGTM other than that. maybe we should split this Go stuff up into its own PR since it's a bit disjoint from the more rote "drop the flag and sweep it from the tree"? | 17:01:27 |
Grimmauld (any/all) | Also tangentially relevant, there is https://github.com/NixOS/nixpkgs/pull/442640 disabling CGO for ppc64 because that is broken. That would be subject of similar considerations | 17:03:46 |
emily | we have already been talking extensively about that yes. and the patch handles it | 17:03:59 |
Grimmauld (any/all) | ah k | 17:04:04 |
emily | we're not changing CGO currently | 17:04:08 |
Grimmauld (any/all) | sorry, should have read more backlog | 17:04:10 |
emily | Lun: actually we don't actually have to exclude ppc64 now right? | 17:04:34 |
emily | because it'll use the internal linker | 17:04:37 |
emily | nothing will change vs. status quo there | 17:04:42 |
emily | oh | 17:05:21 |
emily | no because !InternalLinkPIESupported | 17:05:24 |
emily | Lun: how about making the return true instead be return BuildModeSupported("gc", "pie", goos, goarch) | 17:07:06 |
emily | they explicitly leave ppc64 out there | 17:07:12 |
emily | and it looks like otherwise we'd break e.g. openbsd/amd64 | 17:07:28 |
emily | er rather making the return goarch != "ppc64" be that instead :) | 17:08:44 |
emily | sorry for all the churn here | 17:11:15 |
Lun | This is starting to feel a bit messy to put in the passthru.tests of go :/ | 17:55:13 |
Fabián Heredia | Really happy to see several people helping with gcc15 <3 | 18:11:33 |
emily | something like let test = { pkgs, attr }: { name = attrName + lib.optionalString pkgs.stdenv.hostPlatform.isStatic "-static"; value = …; }; in // lib.listToAttrs (lib.mapCartesianProduct test { pkgs = [ pkgs pkgsStatic ]; attr = [ "skopeo" "clickhouse-backup" ]; }) ? | 18:18:31 |
emily | …which looks messy but hopefully will be less messy on multiple lines 😅 | 18:18:43 |
emily | * something like let test = { pkgs, attrName }: { name = attrName + lib.optionalString pkgs.stdenv.hostPlatform.isStatic "-static"; value = …; }; in // lib.listToAttrs (lib.mapCartesianProduct test { pkgs = [ pkgs pkgsStatic ]; attrName = [ "skopeo" "clickhouse-backup" ]; }) ? | 18:18:53 |
emily | I guess the static and non-static ones probably wouldn't share much code so maybe the deduplication there is not worth it | 18:19:26 |
emily | putting it in another file is also an option | 18:19:34 |
emily | would make it easier to reuse between the two versions | 18:19:38 |
emily | passthru.tests.linking = callPackage ./test-linking.nix { go = finalAttrs.finalPackage; } or such | 18:19:58 |
emily | (well, that's awkward for the static thing…) | 18:20:13 |