Skip to content
  • Edward Z. Yang's avatar
    Move gmp/config.mk.in to config.mk.in, fix #14972 · 2534164a
    Edward Z. Yang authored and Ben Gamari's avatar Ben Gamari committed
    
    
    Here's how the rube goldberg machine triggered the old bug:
    
    1. If you have a file gmp/config.mk.in, then Cabal will
    create a generated file in $DIST/build/gmp/config.mk
    
    2. When you attempt to load inplace integer-gmp via GHCi, it will
    ask gcc (aka clang on OS X) for the file name of 'gmp', with
    base directory set to $DIST/build
    
    3. There is a folder named 'gmp', and so this folder is returned
    as the 'library' for gmp
    
    4. GHCi loadArchive chokes to death trying to open a library
    that is actually a folder
    
    This patch solves the problem by breaking the chain at (1): if we
    don't put config.mk in a folder named gmp, NO PROBLEM.
    
    Signed-off-by: default avatarEdward Z. Yang <ezyang@fb.com>
    
    Test Plan: validate
    
    Reviewers: angerman, hvr, bgamari
    
    Reviewed By: angerman
    
    Subscribers: erikd, thomie, carter
    
    GHC Trac Issues: #14972
    
    Differential Revision: https://phabricator.haskell.org/D4552
    2534164a