You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Following on from the macOS support work in #33 / #34 (build scripts) and #35 (HOST_WIDE_INT fix), I've been thinking about whether old-gcc would benefit from a nix-based build path.
Two motivations:
The linux Dockerfile path and the macOS .sh path drift from each other in subtle ways — xm-darwin: force 32-bit HOST_WIDE_INT to match Linux i386 reference #35 is a good example, the bug only existed on the macOS side because the Dockerfile passes -m32 and the shell script can't on Apple Silicon. With one nix derivation used on both, that whole class of issue disappears.
Local-CI parity. Right now a macOS contributor can't easily reproduce a linux-CI failure without spinning up docker, and a linux contributor can't reproduce a macOS-CI failure at all. With nix, anyone running nix build gets the exact same toolchain CI does, on whichever host they happen to be on.
I have a working proof on the macOS side: one flake.nix builds gcc-2.7.2-psx and produces a cc1 functionally identical to the current release tarball (verified by compiling a real ~4500-line TU and md5-comparing the .s output). The linux side is just nixpkgs stdenv on ubuntu, no cross-compilation needed - same flake, different host.
Two questions:
Are you open to migrating builds to nix? Either replacing the Dockerfile + .sh paths entirely, or running nix alongside them with the eventual goal of replacing.
If yes, would you want all 22 gcc versions covered in one go, or just the three with active macOS support today (2.7.2-psx, 2.7.2-cdk, 2.8.1-psx) first, with the others following later?
Hi! Following on from the macOS support work in #33 / #34 (build scripts) and #35 (HOST_WIDE_INT fix), I've been thinking about whether old-gcc would benefit from a nix-based build path.
Two motivations:
-m32and the shell script can't on Apple Silicon. With one nix derivation used on both, that whole class of issue disappears.nix buildgets the exact same toolchain CI does, on whichever host they happen to be on.I have a working proof on the macOS side: one flake.nix builds gcc-2.7.2-psx and produces a cc1 functionally identical to the current release tarball (verified by compiling a real ~4500-line TU and md5-comparing the .s output). The linux side is just nixpkgs stdenv on ubuntu, no cross-compilation needed - same flake, different host.
Two questions:
Happy to draft the PR if there's appetite.