Skip to content
  • kgardas's avatar
    fix linker_unload test on Solaris/i386 platform · 65e5dbcd
    kgardas authored
    Summary:
    This patch set fixes two issues in linker_unload test case
    on Solaris/i386 platform. First there is an issue in linker_unload.c
    which causes warning to be emitted about _FILE_OFFSET_BITS redefined.
    This is solved by including ghcconfig.h as a first header file.
    Another issue is that on Solaris and its builders we use to configure
    ghc with --with-gmp-libraries=/usr/lib and this causes issue with
    test case Makefile's logic. It attempts to start linker_unload
    and pass it HSinteger-gmp library for unload, but the library
    name is prefixed with two directories names. The first is of
    ghc's integer-gmp/build itself and another is the directory name
    passed to --with-gmp-libraries= configure parameter. In case
    of Solaris this is /usr/lib. The testcase then fails on unloading
    integer-gmp/build directory thinking that this is a library to unload.
    This issue is solved by cuting the first library name from the list
    and using this for unloading the HSinteger-gmp library.
    
    Test Plan: validate
    
    Reviewers: ezyang, austin
    
    Reviewed By: ezyang, austin
    
    Subscribers: phaskell, simonmar, relrod, ezyang, carter
    
    Differential Revision: https://phabricator.haskell.org/D110
    65e5dbcd