nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

binutils: fix windres not finding the apprioate cross compiler

+21 -1
+2 -1
pkgs/development/tools/misc/binutils/default.nix
··· 94 94 # indeed GHC will refuse to compile with a binutils suffering from it. See 95 95 # this comment for more information: 96 96 # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333 97 - lib.optional (stdenv.targetPlatform.isAarch32 && stdenv.hostPlatform.system != stdenv.targetPlatform.system) ./R_ARM_COPY.patch; 97 + lib.optional (stdenv.targetPlatform.isAarch32 && stdenv.hostPlatform.system != stdenv.targetPlatform.system) ./R_ARM_COPY.patch 98 + ++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch; 98 99 99 100 outputs = [ "out" "info" "man" ]; 100 101
+19
pkgs/development/tools/misc/binutils/windres-locate-gcc.patch
··· 1 + diff --git a/binutils/resrc.c b/binutils/resrc.c 2 + index a875c3a4..0411d047 100644 3 + --- a/binutils/resrc.c 4 + +++ b/binutils/resrc.c 5 + @@ -521,7 +521,13 @@ read_rc_file (const char *filename, const char *preprocessor, 6 + 7 + cpp_pipe = 0; 8 + 9 + - if (dash) 10 + + /* Nixpkgs specific : look first at the prefixed path 11 + + ( there should be no gcc in the binutils folder ) */ 12 + + if (slash && dash) { 13 + + cpp_pipe = look_for_default(cmd, slash + 1, dash - slash, preprocargs, filename); 14 + + } 15 + + 16 + + if (dash && ! cpp_pipe) 17 + { 18 + /* First, try looking for a prefixed gcc in the windres 19 + directory, with the same prefix as windres */