summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/Makefile
diff options
context:
space:
mode:
authorKarel Gardas <karel.gardas@centrum.cz>2014-08-06 23:29:46 +0200
committerKarel Gardas <karel.gardas@centrum.cz>2014-08-07 08:46:14 +0200
commit2b3c621685ec975e81ce82472f9a774791b14ac1 (patch)
tree03932e7c58e46b707bd1138896933d0597401441 /testsuite/tests/rts/Makefile
parentf42fa9b872a72e08e3a960bb4bb87a133d2051db (diff)
downloadhaskell-2b3c621685ec975e81ce82472f9a774791b14ac1.tar.gz
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.
Diffstat (limited to 'testsuite/tests/rts/Makefile')
-rw-r--r--testsuite/tests/rts/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/testsuite/tests/rts/Makefile b/testsuite/tests/rts/Makefile
index 180fe9b5ee..02a50a4644 100644
--- a/testsuite/tests/rts/Makefile
+++ b/testsuite/tests/rts/Makefile
@@ -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/^.*: *//')
BASE = $(BASE_DIR)/lib$(BASE_LIB).a