!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

307 Members
96 Servers

Load older messages


SenderMessageTime
25 Aug 2025
@qyliss:fairydust.spaceAlyssa RossThat looks like possibly a GCC internal problem? I'd see if it can be reproduced outside Nix to confirm.14:07:44
@marie:marie.cologneMarie So I tried to build gcc with our flags outside of nix, which resulted in
/home/marie/arch-build/compiler/powerpc-unknown-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/home/marie/arch-build/compiler/powerpc-unknown-linux-gnu/bin/ld: cannot find -lc: No such file or directory
/home/marie/arch-build/compiler/powerpc-unknown-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
When I apply the same hack as we do here (https://github.com/NixOS/nixpkgs/blob/dbfdaa1a1cef034a790d0287bdd885ee78ecb11c/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix#L6-L37), it results in the same error.
I was also to reproduce the same thing in a podman container running arch linux.
18:38:21
@k900:0upti.meK900Yeah not going to happen, you need cc-wrapper for this18:38:44
@marie:marie.cologneMarie you mean to compile gcc? 18:40:46
@marie:marie.cologneMarie So I tried to build gcc with our flags outside of nix, which resulted in
/home/marie/arch-build/compiler/powerpc-unknown-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/home/marie/arch-build/compiler/powerpc-unknown-linux-gnu/bin/ld: cannot find -lc: No such file or directory
/home/marie/arch-build/compiler/powerpc-unknown-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
When I apply the same hack as we do here (https://github.com/NixOS/nixpkgs/blob/dbfdaa1a1cef034a790d0287bdd885ee78ecb11c/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix#L6-L37), it results in the same error as in the nix build.
I was also to reproduce the same thing in a podman container running arch linux.
18:42:09
@marie:marie.cologneMarie I just used a nix-shell -p to try to build a cross binutils and gcc 18:43:47
@marie:marie.cologneMariethat hack seems to work for ppc64 but not for 3218:44:16
@marie:marie.cologneMariei think i found a way to make it work, no idea if it makes stuff explode, but it makes stuff compile, will have another look tomorrow 22:03:06
27 Aug 2025
@marie:marie.cologneMarieSo this platform has a CPU bug which needs a gcc and glibc patch for SMP to work reliably, is there a way to apply these without ending up in override hell?10:30:44
@alex:tunstall.xyzAlex
In reply to @marie:marie.cologne
So this platform has a CPU bug which needs a gcc and glibc patch for SMP to work reliably, is there a way to apply these without ending up in override hell?

Are the bootstrap tools functional despite the bug?

If not, good luck.

12:05:43
@opna2608:matrix.orgPunaprolly bite the bullet and submit staging PRs to add those patches to the gcc & glibc expressions. and for functional bootstrap tools, wait for staging to hit master12:13:22
@marie:marie.cologneMarie I'm only trying to do cross right now, I don't think we even have bootstrap tools for powerpc 12:16:34
@alex:tunstall.xyzAlex Ah, that ought to simplify matters a bit, since you don't even need to override stdenv. 12:17:18
@marie:marie.cologneMarieand these patches are very specific for this cpu, not sure how upstreamable they are12:17:26
@marie:marie.cologneMarie(https://gitlab.com/linux-wiiu/smp-patches)12:17:51
@alex:tunstall.xyzAlex I suspect that overriding pkgsCross.whatever.stdenv.cc is sufficient, though I can't remember how.
Maybe replaceStdenv?
12:18:41
@opna2608:matrix.orgPunai don't see why they shouldn't be upstreamable. prolly just a matter of "someone needs to find the time to submit them to those upstreams"?12:21:47
@opna2608:matrix.orgPuna* i don't see why they shouldn't be upstreamable. prolly just a matter of "someone (ideally the patch author) needs to find the time to submit them to those upstreams"?12:22:26
@alex:tunstall.xyzAlexThere can be many good reasons, e.g. "it's a big hack and would negatively impact all other CPUs"12:22:54
@opna2608:matrix.orgPunahave you looked at the patches?12:23:17
@k900:0upti.meK900Those are all conditional though?12:23:19
@k900:0upti.meK900Like, all the hacks are ifdef'ed12:23:26
@dramforever:matrix.orgdramforever seems like those patches would be conditional on -mcpu=espresso 12:23:48
@alex:tunstall.xyzAlexSo they are.12:24:01
@marie:marie.cologneMarie I was more worried about if upstream would include such hacks for such specific CPU bugs 12:25:20
@marie:marie.cologneMarieI think I'll ask the author if they have plans for upstreaming12:25:36
@dramforever:matrix.orgdramforevergcc does this all the time12:25:36
@k900:0upti.meK900Eh, I'm pretty sure glibc still ships fdiv errata workarounds12:25:37
@k900:0upti.meK900So I don't think this is even particularly bad12:25:45
@dramforever:matrix.orgdramforeverglibc i haven't checked12:25:47

Show newer messages


Back to Room ListRoom Version: 6