Hello,

I, like many other people, have had multi-target GCC on the back of my mind for 
years. For a little background on me, I am a maintainer of Nixpkgs/NixOS who 
does has done a lot of cross compilation work, and, of course, a single 
multi-target build is very useful for making cross compilation to newer 
platforms lighter-weight (along with many other benefits).

I have recently begun work on repacking GCC in Nixpkgs to always build the 
runtime libraries separately. I have also written this blog post [1] explaining 
the background of this approach, and how it relates to other things we do 
(including how we package LLVM).

(To link a few more of the technical bits [2] is what we have for libgcc. [3] 
in particular is, at this time, a short of make targets in gcc/ needed to built 
first before building in libgcc/. I hope eventually all those will go away, but 
that will be more work, as described already in the GCC wiki [4].)

I know making GCC multi-target has dragged on for many years, but I figure 
something like this repackaging could help. Having many people rely on these 
separate builds should give them more attention. Also, I hope focusing on the 
runtime libs before the compiler itself might be slightly easier.

I am curious what you all think of this.

Also, as part of this work, I've also written a number of patches:
 • https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689761.htmlhttps://gcc.gnu.org/pipermail/gcc-patches/2025-July/689775.htmlhttps://gcc.gnu.org/pipermail/gcc-patches/2025-July/689776.htmlhttps://gcc.gnu.org/pipermail/gcc-patches/2025-July/689766.htmlhttps://gcc.gnu.org/pipermail/gcc-patches/2025-July/689865.htmlhttps://gcc.gnu.org/pipermail/gcc-patches/2025-July/690026.html

I've talked a bit on IRC (especially to Arsen Arsenović and Andrew Pinski) 
about both this overall Nixpkgs GCC repackaging project, and these patches in 
particular. https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689774.html was 
already merged, thank you Andrew Pinski. But these other patches will need a 
more dedicated build systems reviewer(s) instead of those two. I am also 
emailing the list in hopes of finding such people.

Cheers,

John

[1]: https://blog.obsidian.systems/compiler-bootstrapping-in-nixpkgs/

[2]: 
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/gcc/ng/common/libgcc/default.nix

[3]:  
<https://github.com/NixOS/nixpkgs/blob/2e410a618e2c6933a481911c3e52ba2195e3eac9/pkgs/development/compilers/gcc/ng/common/libgcc/default.nix#L116-L124>https://github.com/NixOS/nixpkgs/blob/2e410a618e2c6933a481911c3e52ba2195e3eac9/pkgs/development/compilers/gcc/ng/common/libgcc/default.nix#L116-L124

[4]: https://gcc.gnu.org/wiki/Top-Level_Libgcc_Migration

Reply via email to