Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions compiler/ghc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,26 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
'';
buildPhase = ''
runHook preBuild
'' + lib.optionalString (!enableShared && targetPlatform.isAndroid && targetPlatform.isAarch64)
# This is rather idiotic, but we need to create the dynamic (.so) files because
# hadrian expects them in the src/Rules/Rts.hs:160 or thereabout.
''
mkdir -p _build/stage1/lib/aarch64-android-ghc-${ghc-version}/
touch _build/stage1/lib/aarch64-android-ghc-${ghc-version}/libHSrts-1.0.2_thr_debug-ghc${ghc-version}.so
touch _build/stage1/lib/aarch64-android-ghc-${ghc-version}/libHSrts-1.0.2_thr-ghc${ghc-version}.so
touch _build/stage1/lib/aarch64-android-ghc-${ghc-version}/libHSrts-1.0.2_debug-ghc${ghc-version}.so
touch _build/stage1/lib/aarch64-android-ghc-${ghc-version}/libHSrts-1.0.2-ghc${ghc-version}.so
'' + lib.optionalString (!enableShared && targetPlatform.isAndroid && targetPlatform.isAarch32)
# This is rather idiotic, but we need to create the dynamic (.so) files because
# hadrian expects them in the src/Rules/Rts.hs:160 or thereabout.
''
mkdir -p _build/stage1/lib/arm-android-ghc-${ghc-version}/
touch _build/stage1/lib/arm-android-ghc-${ghc-version}/libHSrts-1.0.2_thr_debug-ghc${ghc-version}.so
touch _build/stage1/lib/arm-android-ghc-${ghc-version}/libHSrts-1.0.2_thr-ghc${ghc-version}.so
touch _build/stage1/lib/arm-android-ghc-${ghc-version}/libHSrts-1.0.2_debug-ghc${ghc-version}.so
touch _build/stage1/lib/arm-android-ghc-${ghc-version}/libHSrts-1.0.2-ghc${ghc-version}.so
''
+ ''
${hadrian}/bin/hadrian ${hadrianArgs}
'' + lib.optionalString (installStage1 && !stdenv.targetPlatform.isGhcjs && builtins.compareVersions ghc-version "9.8" < 0) ''
${hadrian}/bin/hadrian ${hadrianArgs} stage1:lib:libiserv
Expand Down
2 changes: 2 additions & 0 deletions overlays/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ in {

++ onAndroid (from "9.6" ./patches/ghc/ghc-9.6-COMPAT_R_ARM_PREL31.patch)
++ onAndroid (from "9.10" ./patches/ghc/ghc-9.10-ignore-libc.patch)
# unbreak modern clang with proper _atomic declarations.
++ onAndroid (fromUntil "9.6" "9.6.5" ./patches/ghc/7db8c9927fae3369fc4ecff68f80c4cb32eea757.patch)

++ onGhcjs (from "9.12" ./patches/ghc/ghc-9.12-ghcjs-rts-mem-heap8.patch)
# Fix for `fatal error: 'rts/Types.h' file not found` when building `primitive`
Expand Down
Loading
Loading