| 3 Jan 2025 |
lzcunt | yep stdenvNoLibc has c++ when not cross compiling and doesn't have c++ when cross compiling | 17:12:01 |
lzcunt | I have a theory | 17:12:04 |
Artturin | In reply to @sananatheskenana:matrix.org
nix-repl> pkgs.pkgsCross.x86_64-linux-mlibc.mlibc.stdenv.cc.cc.langCC
false
Ah I was looking in the wrong attr | 17:12:32 |
lzcunt | in all-packages
stdenvNoLibc =
if stdenvNoCC.hostPlatform != stdenvNoCC.buildPlatform
then
(if stdenvNoCC.hostPlatform.isDarwin || stdenvNoCC.hostPlatform.useLLVM or false
then overrideCC stdenvNoCC buildPackages.llvmPackages.clangNoLibc
else gccCrossLibcStdenv)
else mkStdenvNoLibs stdenv;
| 17:14:08 |
lzcunt | my theory is that the else branch does have c++ but the other branch does not | 17:14:29 |
lzcunt | so gccCrossLibcStdenv does not enable C++ | 17:14:54 |
Artturin | Yep gccWithoutTargetLibc | 17:15:06 |
Artturin | You can do / then ^ gccWithoutTargetLibc in vim | 17:15:28 |
lzcunt | ah so nobody expected someone build a libc in C++ | 17:16:29 |
emily | oh, it's C++? | 17:17:43 |
emily | I would have warned you it might be rough if you said so 😆 | 17:17:58 |
emily | though I think the LLVM libc is C++ too? | 17:18:08 |
lzcunt | I think LLVM libc doesn't use stdenvNoLibc? | 17:18:30 |
lzcunt | because of the stdenvNoCC.hostPlatform.useLLVM check | 17:18:44 |
lzcunt | * I think LLVM libc doesn't use gccCrossLibcStdenv? | 17:19:17 |
lzcunt | so basically if the LLVM libc PR decided to not default to using LLVM for everything they would have hit this issue too | 17:19:59 |
lzcunt | what would be the correct way to handle this? this means clangNoLibc has C++ while gccWithoutTargetLibc does not | 17:22:00 |
emily | right | 17:22:01 |
lzcunt | I think this should be the same between them | 17:22:36 |
lzcunt | would enabling langCC in gccWithoutTargetLibc cause mass rebuilds? | 17:22:49 |
Artturin | In reply to @sananatheskenana:matrix.org would enabling langCC in gccWithoutTargetLibc cause mass rebuilds? I remove that line and it's just rebuilding cross stuff | 17:23:28 |
Artturin | 2 more mins | 17:24:31 |
lzcunt | well then I think it makes sense to remove that line | 17:24:45 |
lzcunt | would it be out of scope for my future mlibc PR? should I send that seperately? | 17:25:02 |