on iko/ghcjs-patch-master help sign in
Fix windows cross compile issues with C++ code (#1100)
5758f1cHamish Mackenzie
overlays/bootstrap.nix+1
@@ -157,6 +157,7 @@ in {
157 ++ final.lib.optional (versionAtLeast "8.6.4") ./patches/ghc/Cabal-3886.patch
157 ++ final.lib.optional (versionAtLeast "8.6.4") ./patches/ghc/Cabal-3886.patch
158
158
159 ++ fromUntil "8.10.3" "8.10.5" ./patches/ghc/ghc-8.10.3-rts-make-markLiveObject-thread-safe.patch
159 ++ fromUntil "8.10.3" "8.10.5" ./patches/ghc/ghc-8.10.3-rts-make-markLiveObject-thread-safe.patch
160+ ++ final.lib.optional (versionAtLeast "8.10.4" && final.targetPlatform.isWindows) ./patches/ghc/ghc-8.10-z-drive-fix.patch
160 ;
161 ;
161 in ({
162 in ({
162 ghc844 = final.callPackage ../compiler/ghc {
163 ghc844 = final.callPackage ../compiler/ghc {
overlays/patches/ghc/ghc-8.10-z-drive-fix.patchnew file+14
@@ -0,0 +1,14 @@
1+diff --git a/libraries/libiserv/src/Remote/Slave.hs b/libraries/libiserv/src/Remote/Slave.hs
2+index 577161f35f..3a4dbbf842 100644
3+--- a/libraries/libiserv/src/Remote/Slave.hs
4++++ b/libraries/libiserv/src/Remote/Slave.hs
5+@@ -128,6 +128,8 @@ hook verbose base_path pipe m = case m of
6+ -- system libraries.
7+ Msg (LoadDLL path@('C':':':_)) -> do
8+ return m
9++ Msg (LoadDLL path@('Z':':':_)) -> do
10++ return m
11+ Msg (LoadDLL path) | isAbsolute path -> do
12+ when verbose $ trace ("Need DLL: " ++ (base_path <//> path))
13+ handleLoad pipe path (base_path <//> path)
14+
overlays/windows.nix+7−1
@@ -73,11 +73,17 @@ final: prev:
73 # dependencies) and then placing them somewhere where wine+remote-iserv
73 # dependencies) and then placing them somewhere where wine+remote-iserv
74 # will find them.
74 # will find them.
75 remote-iserv.postInstall = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isWindows (
75 remote-iserv.postInstall = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isWindows (
76− let extra-libs = [ pkgs.openssl.bin pkgs.libffi pkgs.gmp pkgs.libsodium ]; in ''
76+ let extra-libs = [ pkgs.openssl.bin pkgs.libffi pkgs.gmp pkgs.libsodium pkgs.windows.mcfgthreads pkgs.buildPackages.gcc.cc ]; in ''
77 for p in ${lib.concatStringsSep " "extra-libs}; do
77 for p in ${lib.concatStringsSep " "extra-libs}; do
78 find "$p" -iname '*.dll' -exec cp {} $out/bin/ \;
78 find "$p" -iname '*.dll' -exec cp {} $out/bin/ \;
79 find "$p" -iname '*.dll.a' -exec cp {} $out/bin/ \;
79 find "$p" -iname '*.dll.a' -exec cp {} $out/bin/ \;
80 done
80 done
81+ (
82+ cd $out/bin
83+ for l in lib*.dll; do
84+ ln -s "$l" "''${l#lib}"
85+ done
86+ )
81 '');
87 '');
82
88
83 # Apply https://github.com/haskell/cabal/pull/6055
89 # Apply https://github.com/haskell/cabal/pull/6055