@@ -18,6 +18,8 @@
19, doCheck ? component.doCheck || componentId.ctype == "test"
19, doCheck ? component.doCheck || componentId.ctype == "test"
20, doCrossCheck ? component.doCrossCheck || false
20, doCrossCheck ? component.doCrossCheck || false
@@ -118,9 +120,21 @@ let
118 [ "--prefix=$out"
120 [ "--prefix=$out"
119 "${componentId.ctype}:${componentId.cname}"
121 "${componentId.ctype}:${componentId.cname}"
120 "$(cat ${configFiles}/configure-flags)"
122 "$(cat ${configFiles}/configure-flags)"
121 "--with-ghc=${ghc.targetPrefix}ghc"
124 "--with-ghc=${ghc.targetPrefix}ghc"
122 "--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg"
125 "--with-ghc-pkg=${ghc.targetPrefix}ghc-pkg"
123 "--with-hsc2hs=${ghc.targetPrefix}hsc2hs"
126 "--with-hsc2hs=${ghc.targetPrefix}hsc2hs"
128+ "--with-gcc=${stdenv.cc.targetPrefix}cc"
130+ "--with-ld=${stdenv.cc.bintools.targetPrefix}ld"
131+ "--with-ar=${stdenv.cc.bintools.targetPrefix}ar"
132+ "--with-strip=${stdenv.cc.bintools.targetPrefix}strip"
135+ "--enable-split-sections"
136+ "--enable-executable-stripping"
137+ "--enable-library-stripping"
124 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) (
138 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) (
125 map (arg: "--hsc2hs-option=" + arg) ["--cross-compile" "--via-asm"]
139 map (arg: "--hsc2hs-option=" + arg) ["--cross-compile" "--via-asm"]
126 ++ lib.optional (package.buildType == "Configure") "--configure-option=--host=${stdenv.hostPlatform.config}"
140 ++ lib.optional (package.buildType == "Configure") "--configure-option=--host=${stdenv.hostPlatform.config}"
@@ -130,7 +144,7 @@ let
130in stdenv.mkDerivation ({
144in stdenv.mkDerivation ({
131 name = fullName;
145 name = fullName;
133− inherit src doCheck doCrossCheck;
147+ inherit src doCheck doCrossCheck dontPatchELF dontStrip;
135 passthru = {
149 passthru = {
136 inherit (package) identifier;
150 inherit (package) identifier;