Merge pull request #47626 from obsidiansystems/ghc-cross-fixes
ghc: Misc cross fixes
This commit is contained in:
commit
a3d86b49b4
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
, # Whether to build dynamic libs for the standard library (on the target
|
, # Whether to build dynamic libs for the standard library (on the target
|
||||||
# platform). Static libs are always built.
|
# platform). Static libs are always built.
|
||||||
enableShared ? true
|
enableShared ? !stdenv.targetPlatform.useiOSPrebuilt
|
||||||
|
|
||||||
, # What flavour to build. An empty string indicates no
|
, # What flavour to build. An empty string indicates no
|
||||||
# specific flavour and falls back to ghc default values.
|
# specific flavour and falls back to ghc default values.
|
||||||
@ -79,7 +79,7 @@ let
|
|||||||
targetCC = builtins.head toolsForTarget;
|
targetCC = builtins.head toolsForTarget;
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (rec {
|
||||||
version = "8.2.2";
|
version = "8.2.2";
|
||||||
name = "${targetPrefix}ghc-${version}";
|
name = "${targetPrefix}ghc-${version}";
|
||||||
|
|
||||||
@ -239,4 +239,8 @@ stdenv.mkDerivation rec {
|
|||||||
inherit (ghc.meta) license platforms;
|
inherit (ghc.meta) license platforms;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||||
|
dontStrip = true;
|
||||||
|
dontPatchELF = true;
|
||||||
|
noAuditTmpdir = true;
|
||||||
|
})
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert !enableIntegerSimple -> gmp != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
|
||||||
|
|
||||||
@ -48,8 +50,7 @@ let
|
|||||||
include mk/flavours/\$(BuildFlavour).mk
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
endif
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
|
||||||
INTEGER_LIBRARY = integer-simple
|
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||||
CrossCompilePrefix = ${targetPrefix}
|
CrossCompilePrefix = ${targetPrefix}
|
||||||
@ -77,7 +78,7 @@ let
|
|||||||
targetCC = builtins.head toolsForTarget;
|
targetCC = builtins.head toolsForTarget;
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (rec {
|
||||||
inherit version;
|
inherit version;
|
||||||
inherit (src) rev;
|
inherit (src) rev;
|
||||||
name = "${targetPrefix}ghc-${version}";
|
name = "${targetPrefix}ghc-${version}";
|
||||||
@ -206,4 +207,8 @@ stdenv.mkDerivation rec {
|
|||||||
inherit (ghc.meta) license platforms;
|
inherit (ghc.meta) license platforms;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||||
|
dontStrip = true;
|
||||||
|
dontPatchELF = true;
|
||||||
|
noAuditTmpdir = true;
|
||||||
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user