Skip to content
  • Sergei Trofimovich's avatar
    fix 'make install' for cross-stage2 · 54895c90
    Sergei Trofimovich authored
    
    
    When cross-built GHC is being installed one of
    latest steps is to register installed libraries
    with 'ghc-pkg'.
    
    GHC uses freshly installed 'ghc-pkg' and 'ghc-stage2'
    for that.
    
    Tested as:
        ./configure --target=aarch64-unknown-linux-gnu
        make install DESTDIR=$(pwd)/__s2 STRIP_CMD=:
    
    Before the change install failed on ghc-pkg execution phase:
    
        ".../ghc-cross/__s2/usr/local/lib/ghc-8.3.20170406/bin/ghc-pkg" \
            --force \
            --global-package-db \
            ".../ghc-cross/__s2/usr/local/lib/ghc-8.3.20170406/package.conf.d" \
            update rts/dist/package.conf.install
        /bin/sh: .../ghc-cross/__s2/usr/local/lib/ghc-8.3.20170406/bin/ghc-pkg: \
            No such file or directory
    
    To avoid breakage we use 'ghc' and 'ghc-pkg' built by stage0.
    
    Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
    
    Test Plan: run 'make install' on stage2 crosscompiler
    
    Reviewers: rwbarton, austin, bgamari
    
    Subscribers: thomie, snowleopard
    
    Differential Revision: https://phabricator.haskell.org/D3432
    54895c90