on iko/ghcjs-patch-master help sign in
smaller
commit980c2768b91dbb93802f91dc2aadcbfec3f13fa0 authorMoritz Angermann <moritz.angermann@gmail.com> dateSun 23 Dec 2018, 14:10 (8 years ago) parent11a4b5e
1 file changed+15−1
builder/comp-builder.nix+15−1
builder/comp-builder.nix+15−1
@@ -18,6 +18,8 @@
1818
1919, doCheck ? component.doCheck || componentId.ctype == "test"
2020, doCrossCheck ? component.doCrossCheck || false
21+, dontPatchELF ? true
22+, dontStrip ? true
2123}:
2224
2325let
@@ -118,9 +120,21 @@ let
118120 [ "--prefix=$out"
119121 "${componentId.ctype}:${componentId.cname}"
120122 "$(cat ${configFiles}/configure-flags)"
123+ # GHC
121124 "--with-ghc=${ghc.targetPrefix}ghc"
122125 "--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg"
123126 "--with-hsc2hs=${ghc.targetPrefix}hsc2hs"
127+ # CC
128+ "--with-gcc=${stdenv.cc.targetPrefix}cc"
129+ # BINTOOLS
130+ "--with-ld=${stdenv.cc.bintools.targetPrefix}ld"
131+ "--with-ar=${stdenv.cc.bintools.targetPrefix}ar"
132+ "--with-strip=${stdenv.cc.bintools.targetPrefix}strip"
133+ # other flags
134+ "--enable-static"
135+ "--enable-split-sections"
136+ "--enable-executable-stripping"
137+ "--enable-library-stripping"
124138 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) (
125139 map (arg: "--hsc2hs-option=" + arg) ["--cross-compile" "--via-asm"]
126140 ++ lib.optional (package.buildType == "Configure") "--configure-option=--host=${stdenv.hostPlatform.config}"
@@ -130,7 +144,7 @@ let
130144in stdenv.mkDerivation ({
131145 name = fullName;
132146
133− inherit src doCheck doCrossCheck;
147+ inherit src doCheck doCrossCheck dontPatchELF dontStrip;
134148
135149 passthru = {
136150 inherit (package) identifier;