on iko/ghcjs-patch-master help sign in
[linux-cross] clean up
fa47874Moritz Angermann
overlays/linux-cross.nix+6−7
@@ -35,23 +35,22 @@ let
35 unset configureFlags
35 unset configureFlags
36 PORT=$((5000 + $RANDOM % 5000))
36 PORT=$((5000 + $RANDOM % 5000))
37 (>&2 echo "---> Starting remote-iserv on port $PORT")
37 (>&2 echo "---> Starting remote-iserv on port $PORT")
38− ${qemu}/bin/qemu-${qemuSuffix} ${remote-iserv}/bin/remote-iserv tmp $PORT &
38+ ${qemu}/bin/qemu-${qemuSuffix} ${remote-iserv.override { enableDebugRTS = true; enableDWARF = true; }}/bin/remote-iserv tmp $PORT &
39 (>&2 echo "---| remote-iserv should have started on $PORT")
39 (>&2 echo "---| remote-iserv should have started on $PORT")
40 RISERV_PID="$!"
40 RISERV_PID="$!"
41 ${iserv-proxy}/bin/iserv-proxy $@ 127.0.0.1 "$PORT"
41 ${iserv-proxy}/bin/iserv-proxy $@ 127.0.0.1 "$PORT"
42− (>&2 echo "---> killing remote-iserve...")
42+ (>&2 echo "---> killing remote-iserv...")
43 kill $RISERV_PID
43 kill $RISERV_PID
44 '';
44 '';
45 configureFlags = lib.optional hostPlatform.isAarch32 "--disable-split-sections";
45 configureFlags = lib.optional hostPlatform.isAarch32 "--disable-split-sections";
46− setupBuildFlags = map (opt: "--ghc-option=" + opt) ((lib.optionals isLinuxCross
46+ setupBuildFlags = (map (opt: "--ghc-option=" + opt) (lib.optionals isLinuxCross
47 [ "-fexternal-interpreter"
47 [ "-fexternal-interpreter"
48 "-pgmi" "${qemuIservWrapper}/bin/iserv-wrapper"
48 "-pgmi" "${qemuIservWrapper}/bin/iserv-wrapper"
49 "-L${gmp}/lib"
49 "-L${gmp}/lib"
50 # Required to work-around https://gitlab.haskell.org/ghc/ghc/issues/15275
50 # Required to work-around https://gitlab.haskell.org/ghc/ghc/issues/15275
51− ] ++ lib.optionals hostPlatform.isAarch64 ["-fPIC"]))
51+ ])) ++ (map (opt: "--gcc-option=" + opt) (lib.optionals (hostPlatform.isAarch32 || hostPlatform.isAarch64)
52− ++ lib.optionals hostPlatform.isAarch32 (map (opt: "--gcc-option=" + opt) [ "-fno-pic" "-fno-plt" ])
52+ [ "-fPIC" "-fno-plt" ]));
53− # Also for GHC #15275
53+
54− ++ lib.optionals hostPlatform.isAarch64 ["--gcc-option=-fPIC"];
55 qemuTestWrapper = writeScriptBin "test-wrapper" ''
54 qemuTestWrapper = writeScriptBin "test-wrapper" ''
56 #!${stdenv.shell}
55 #!${stdenv.shell}
57 set -euo pipefail
56 set -euo pipefail