Commit 2b3c6216 authored by kgardas's avatar kgardas
Browse files

fix linker_unload test for ghc configurations with --with-gmp-libraries

The issue is presented in Makefile logic where 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. The testcase then
fails on unloading integer-gmp/build directory thinking that this is
a library to unload. The issue is solved by cuting (head -1) the first
library name from the list and using this for unloading the HSinteger-gmp
library. I use head -1 instead of cut -d ' ' here since ghc may be
installed into the directory with space(s) in its name like in the case
when running validate.
parent f42fa9b8
......@@ -108,7 +108,11 @@ BASE_DIR = $(shell $(LOCAL_GHC_PKG) field base library-dirs | sed 's/^.*: *//')
BASE_LIB = $(shell $(LOCAL_GHC_PKG) field base hs-libraries | sed 's/^.*: *//')
GHC_PRIM_DIR = $(shell $(LOCAL_GHC_PKG) field ghc-prim library-dirs | sed 's/^.*: *//')
GHC_PRIM_LIB = $(shell $(LOCAL_GHC_PKG) field ghc-prim hs-libraries | sed 's/^.*: *//')
INTEGER_GMP_DIR = $(shell $(LOCAL_GHC_PKG) field integer-gmp library-dirs | sed 's/^.*: *//')
# We need to get first library directory here in order to get rid of
# system gmp library directory installation when ghc is configured
# with --with-gmp-libraries=<dir> parameter
INTEGER_GMP_DIR = $(shell $(LOCAL_GHC_PKG) field integer-gmp library-dirs \
| sed 's/^.*: *//' | head -1)
INTEGER_GMP_LIB = $(shell $(LOCAL_GHC_PKG) field integer-gmp hs-libraries | sed 's/^.*: *//')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment