pkgsCross.mingwW64.windows.mcfgthreads: add gcc13 compatible version#236598
pkgsCross.mingwW64.windows.mcfgthreads: add gcc13 compatible version#236598trofi merged 1 commit intoNixOS:masterfrom
Conversation
Upstream `gcc-13` merged `mcfgthreads` support with a caveat: it's
headers interface is not compatible with the patch `nixpkgs` was
carrying in `gcc-12` and before.
To keep both new (`gcc13`) and old (`_pre_gcc13`) version I held back
previous `windows.mcfgthreads` attribute as
`windows.mcfgthreads_pre_gcc_13`. It is used for `gcc` before 13.
The change fixes the build of `pkgsCross.mingwW64.stdenv` itself and
example program:
$ nix build --impure --expr 'with import ./. {}; pkgsCross.mingwW64.re2c.override { stdenv = pkgsCross.mingwW64.gcc11Stdenv; }'
Required per NixOS/nixpkgs#236598.
| threadsCross_pre_gcc_13 = if stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false) | ||
| then { | ||
| # other possible values: win32 or posix | ||
| model = "mcf"; | ||
| # For win32 or posix set this to null | ||
| package = targetPackages.windows.mcfgthreads_pre_gcc_13 or windows.mcfgthreads_pre_gcc_13; | ||
| } else { }; |
There was a problem hiding this comment.
Please stop copy-pasting code like this. Please.
There was a problem hiding this comment.
Feel free to revert. Thanks.
There was a problem hiding this comment.
I'm not asking for permission to revert this, I'm asking you to stop doing it.
When you duplicate code like this, eventually either:
- Somebody will change one copy and forget to change the other.
- Somebody will deliberately change only one, but leave no explanation of why they didn't change the other.
Either way, if the duplication hasn't been noticed before one of these happens, we don't know which of them happened.
There was a problem hiding this comment.
I consider a bit if I should stop contributing at all. Thanks.
There was a problem hiding this comment.
Removed myself from the org.
There was a problem hiding this comment.
@trofi please reconsider your decision, I don't think @amjoseph-nixpkgs has any ill intentions.
I know that it can be frustrating when higher standards for code are asked.
We all struggle between perfect and shipping, but let's leave the room for discussions.
Upstream
gcc-13mergedmcfgthreadssupport with a caveat: it's headers interface is not compatible with the patchnixpkgswas carrying ingcc-12and before.To keep both new (
gcc13) and old (_pre_gcc13) version I held back previouswindows.mcfgthreadsattribute aswindows.mcfgthreads_pre_gcc_13. It is used forgccbefore 13.The change fixes the build of
pkgsCross.mingwW64.stdenvitself and example program:Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)