on iko/ghcjs-patch-master help sign in
Fix missing -lnuma when linking musl test exes (#652)
6dc93ceHamish Mackenzie
builder/comp-builder.nix+12−5
@@ -1,5 +1,11 @@
1−{ stdenv, buildPackages, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, ghcForComponent, hsPkgs, runCommand, libffi, gmp, zlib, ncurses, nodejs }:
1+{ stdenv, buildPackages, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, ghcForComponent, hsPkgs, runCommand, libffi, gmp, zlib, ncurses, numactl, nodejs }:
2−
2+let
3+ # These are here to avoid multiple calls to override
4+ gmpStatic = gmp.override { withStatic = true; };
5+ zlibStatic = zlib.static;
6+ ncursesStatic = ncurses.override { enableStatic = true; };
7+ numactlStatic = numactl.overrideAttrs (_: { configureFlags = "--enable-static"; });
8+in
3lib.makeOverridable (
9lib.makeOverridable (
4let self =
10let self =
5{ componentId
11{ componentId
@@ -120,9 +126,10 @@ let
120 "--disable-executable-dynamic"
126 "--disable-executable-dynamic"
121 "--ghc-option=-optl=-pthread"
127 "--ghc-option=-optl=-pthread"
122 "--ghc-option=-optl=-static"
128 "--ghc-option=-optl=-static"
123− "--ghc-option=-optl=-L${gmp.override { withStatic = true; }}/lib"
129+ "--ghc-option=-optl=-L${gmpStatic}/lib"
130+ "--ghc-option=-optl=-L${zlibStatic}/lib"
124− "--ghc-option=-optl=-L${zlib.static}/lib"
131+ "--ghc-option=-optl=-L${ncursesStatic}/lib"
125− "--ghc-option=-optl=-L${ncurses.override { enableStatic = true; }}/lib"
132+ "--ghc-option=-optl=-L${numactlStatic}/lib"
126 ] ++ lib.optional enableSeparateDataOutput "--datadir=$data/share/${ghc.name}"
133 ] ++ lib.optional enableSeparateDataOutput "--datadir=$data/share/${ghc.name}"
127 ++ lib.optional doHaddock' "--docdir=${docdir "$doc"}"
134 ++ lib.optional doHaddock' "--docdir=${docdir "$doc"}"
128 ++ lib.optional (enableLibraryProfiling || enableExecutableProfiling) "--profiling-detail=${profilingDetail}"
135 ++ lib.optional (enableLibraryProfiling || enableExecutableProfiling) "--profiling-detail=${profilingDetail}"
lib/materialize.nix+2−2
@@ -77,7 +77,7 @@ let
77 if materialized != null && !__pathExists materialized
77 if materialized != null && !__pathExists materialized
78 then ''
78 then ''
79 echo "Materialized nix used for ${name} is missing. To fix run :" >> $ERR
79 echo "Materialized nix used for ${name} is missing. To fix run :" >> $ERR
80− echo " cp -Lr ${calculateNoHash} ${toString materialized}" >> $ERR
80+ echo " cp -r ${calculateNoHash} ${toString materialized}" >> $ERR
81 echo " chmod -R +w ${toString materialized}" >> $ERR
81 echo " chmod -R +w ${toString materialized}" >> $ERR
82 cat $ERR
82 cat $ERR
83 false
83 false
@@ -91,7 +91,7 @@ let
91 diff -ru ${materialized} ${calculateNoHash} || true
91 diff -ru ${materialized} ${calculateNoHash} || true
92 echo "Materialized nix used for ${name} incorrect. To fix run :" >> $ERR
92 echo "Materialized nix used for ${name} incorrect. To fix run :" >> $ERR
93 echo " rm -rf ${toString materialized}" >> $ERR
93 echo " rm -rf ${toString materialized}" >> $ERR
94− echo " cp -Lr ${calculateNoHash} ${toString materialized}" >> $ERR
94+ echo " cp -r ${calculateNoHash} ${toString materialized}" >> $ERR
95 echo " chmod -R +w ${toString materialized}" >> $ERR
95 echo " chmod -R +w ${toString materialized}" >> $ERR
96 fi
96 fi
97 '')
97 '')
materialized/dummy-ghc/ghc-8.6.5-x86_64-linux/ghc-pkg/dump-global+1−1
@@ -1001,7 +1001,7 @@ maintainer: glasgow-haskell-users@haskell.org
1001exposed: True
1001exposed: True
1002hs-libraries: HSrts
1002hs-libraries: HSrts
1003extra-libraries:
1003extra-libraries:
1004− m rt dl ffi pthread
1004+ m rt dl ffi numa pthread
1005includes:
1005includes:
1006 Stg.h
1006 Stg.h
1007ld-options: "-Wl,-u,base_GHCziTopHandler_runIO_closure"
1007ld-options: "-Wl,-u,base_GHCziTopHandler_runIO_closure"
materialized/dummy-ghc/ghc-8.8.3-x86_64-linux/ghc-pkg/dump-global+1−1
@@ -1526,7 +1526,7 @@ maintainer: glasgow-haskell-users@haskell.org
1526exposed: True
1526exposed: True
1527library-dirs:
1527library-dirs:
1528hs-libraries: HSrts
1528hs-libraries: HSrts
1529−extra-libraries: m rt dl ffi pthread
1529+extra-libraries: m rt dl ffi numa pthread
1530include-dirs:
1530include-dirs:
1531includes: Stg.h
1531includes: Stg.h
1532ld-options:
1532ld-options:
materialized/dummy-ghc/x86_64-unknown-linux-musl-x86_64-unknown-linux-musl-ghc-8.6.5-x86_64-linux/ghc-pkg/dump-global+1−1
@@ -1000,7 +1000,7 @@ maintainer: glasgow-haskell-users@haskell.org
1000exposed: True
1000exposed: True
1001hs-libraries: HSrts
1001hs-libraries: HSrts
1002extra-libraries:
1002extra-libraries:
1003− m rt dl ffi
1003+ m rt dl ffi numa
1004includes:
1004includes:
1005 Stg.h
1005 Stg.h
1006ld-options: "-Wl,-u,base_GHCziTopHandler_runIO_closure"
1006ld-options: "-Wl,-u,base_GHCziTopHandler_runIO_closure"
materialized/dummy-ghc/x86_64-unknown-linux-musl-x86_64-unknown-linux-musl-ghc-8.8.3-x86_64-linux/ghc-pkg/dump-global+1−1
@@ -1491,7 +1491,7 @@ maintainer: glasgow-haskell-users@haskell.org
1491exposed: True
1491exposed: True
1492library-dirs:
1492library-dirs:
1493hs-libraries: HSrts
1493hs-libraries: HSrts
1494−extra-libraries: m rt dl ffi
1494+extra-libraries: m rt dl ffi numa
1495include-dirs:
1495include-dirs:
1496includes: Stg.h
1496includes: Stg.h
1497ld-options:
1497ld-options: