gcc: copy windows library file to the lib output #84815
Closed
+2
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
I think interesing to ability of nixos to crosscompile for windows. I tried to do this for gnash, where an old version exist for windows. However, there was an error compiling gettext. This solver the issue, allowing gettext to compile for windows.
Things done
copy *.dll and *.a file to the lib output of gcc. I'm not sure if I should copy *.a file, however.
Note: I just tested compilation of pkgsCross.mingwW64.gettext, and every thing that depend on it. It should impact other platform version of the gcc library. Further testing show this also allow pkgsCross.mingwW64.gmp to compile.
I'm a bit worried to this do a full rebuild of gcc for every user, but I can't add a conditional instruction that do this for windows only without changing the hash of the builder.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)