!xmLtiCaAJxfhURjrXl:matrix.org

NixOS RISC-V

209 Members
NixOS on RISC-V https://wiki.nixos.org/wiki/RISC-V https://pad.lassul.us/NixOS-riscv64-linux https://github.com/orgs/NixOS/teams/risc-v62 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
25 Apr 2025
@outfoxxed:outfoxxed.meoutfoxxedhaha05:23:29
@dramforever:matrix.orgdramforeverlet's start from the basics, whenever you build something the build process has (build, host, target)05:24:25
@dramforever:matrix.orgdramforeverwe'll write (b, h, t) from now on05:24:30
@dramforever:matrix.orgdramforeverand you pass localSystem and crossSystem to nixpkgs, let's call those L and C05:24:47
@dramforever:matrix.orgdramforeverwe build pkgs.gcc from that, what happens?05:26:45
@dramforever:matrix.orgdramforever oh btw as i said t doesn't matter if you're not a compiler, so i'll write (b, h, *) in cases where t doesn't matter 05:27:43
@dramforever:matrix.orgdramforeverfirstly, the bootstrap process eventually makes a (L, L, L) gcc05:28:18
@dramforever:matrix.orgdramforeverusing that we build a (L, L, C) gcc (without libc)05:29:25
@dramforever:matrix.orgdramforeverand using that, we build a (L, C, *) glibc05:29:55
@dramforever:matrix.orgdramforeverwe combine the two together to make a (L, L, C) gcc wrapper (contains libc)05:30:15
@outfoxxed:outfoxxed.meoutfoxxedisn't the gcc and glibc build process supposed to be combined in some way nobody else does that makes this overly annoying05:32:00
@outfoxxed:outfoxxed.meoutfoxxedso does this mean a "build on L, runs/links on C" glibc?05:34:14
@dramforever:matrix.orgdramforevercorrect05:34:53
@outfoxxed:outfoxxed.meoutfoxxedso what makes gcc single-target? just design choices on their end05:35:40
@dramforever:matrix.orgdramforeveryes05:35:48
@outfoxxed:outfoxxed.meoutfoxxedmost other compilers are (L, L, *) right05:36:04
@dramforever:matrix.orgdramforeverunwrapped clang is (L, L, *)05:36:27
@dramforever:matrix.orgdramforeverwhich is why when you cross using llvm you don't rebuild the entire clang05:36:41
@dramforever:matrix.orgdramforeverbut wrapped clang is (L, L, C) because it has the libc and stuff wrapped in it05:37:13
@outfoxxed:outfoxxed.meoutfoxxedok that makes sense thanks05:37:28
@dramforever:matrix.orgdramforever if we're actually trying to get pkgs.gcc, then we need to keep going because we want to have a gcc that runs on C 05:42:40
@dramforever:matrix.orgdramforeverso using that (L, L, C) gcc we build a (L, C, C) gcc, and wrap that with the (L, C, *) glibc to create a (L, C, C) gcc wrapper05:43:04
@dramforever:matrix.orgdramforever now this is as far as the whole process goes in nixpkgs 05:43:23

Show newer messages


Back to Room ListRoom Version: 10