| 3 Jan 2025 |
Artturin | * nix-repl> pkgsCross.x86_64-linux-mlibc.stdenv.cc.cc.langCC
true
Should be but
--enable-languages=c
| 17:04:42 |
Artturin | --enable-languages=c\,c++ nix log ".#stdenv.cc.cc" | 17:05:03 |
Artturin | * --enable-languages=c\,c++ in nix log ".#stdenv.cc.cc" | 17:05:08 |
Artturin | https://github.com/NixOS/nixpkgs/blob/8adbfd92518a59f18a8216c4b13a11cedc16abf0/pkgs/development/compilers/gcc/common/configure-flags.nix#L167 | 17:05:48 |
Artturin | The configure flags: in the log is printed by configurePhase and not gcc's buildSystem | 17:06:29 |
Artturin | * The configure flags: in the log is printed by configurePhase and not gcc's build system | 17:06:34 |
Artturin | * The configure flags: in the log is printed by our configurePhase and not gcc's build system | 17:06:40 |
lzcunt | I just ran this and it didn't have c++ | 17:07:05 |
lzcunt | hmm just maybe, the stdenvNoLibc gcc does not have c++ (I haven't looked into this yet because my internet is slow lol) | 17:07:27 |
lzcunt | no it would have c++ because mlibc does compile when not cross compiling | 17:07:52 |
lzcunt | nix-repl> pkgs.pkgsCross.x86_64-linux-mlibc.mlibc.stdenv.cc.cc.langCC
false
| 17:11:14 |
lzcunt | huh | 17:11:15 |
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 |