[commit: ghc] master: fix linker_unload test on Solaris/i386 platform (65e5dbc)
git at git.haskell.org
git at git.haskell.org
Mon Aug 4 13:13:10 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/65e5dbcd3971cb3ef5b9073096e5d063034b90c1/ghc
>---------------------------------------------------------------
commit 65e5dbcd3971cb3ef5b9073096e5d063034b90c1
Author: Karel Gardas <karel.gardas at centrum.cz>
Date: Mon Aug 4 08:10:11 2014 -0500
fix linker_unload test on Solaris/i386 platform
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
>---------------------------------------------------------------
65e5dbcd3971cb3ef5b9073096e5d063034b90c1
testsuite/tests/rts/Makefile | 4 +++-
testsuite/tests/rts/linker_unload.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/testsuite/tests/rts/Makefile b/testsuite/tests/rts/Makefile
index 180fe9b..8833d45 100644
--- a/testsuite/tests/rts/Makefile
+++ b/testsuite/tests/rts/Makefile
@@ -108,7 +108,9 @@ 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/^.*: *//')
+# need to cut 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/^.*: *//' | cut -d ' ' -f -1)
INTEGER_GMP_LIB = $(shell $(LOCAL_GHC_PKG) field integer-gmp hs-libraries | sed 's/^.*: *//')
BASE = $(BASE_DIR)/lib$(BASE_LIB).a
diff --git a/testsuite/tests/rts/linker_unload.c b/testsuite/tests/rts/linker_unload.c
index 55870c3..f1cc891 100644
--- a/testsuite/tests/rts/linker_unload.c
+++ b/testsuite/tests/rts/linker_unload.c
@@ -1,3 +1,4 @@
+#include "ghcconfig.h"
#include <stdio.h>
#include <stdlib.h>
#include "Rts.h"
More information about the ghc-commits
mailing list