summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorKarel Gardas <karel.gardas@centrum.cz>2014-07-13 21:43:20 -0500
committerAustin Seipp <austin@well-typed.com>2014-07-13 21:43:21 -0500
commit6da603213b097a267418d8c14cbfaf0021ac2b2c (patch)
treed4ce537f5ab59241544bdb1d1e47023d96d3125b /aclocal.m4
parent16403f0d182d2d3d0b1fbe5ad778ead4bfcb7e16 (diff)
downloadhaskell-6da603213b097a267418d8c14cbfaf0021ac2b2c.tar.gz
add support for x86_64-solaris2 platform
Summary: this set of patches adds support for x86_64-solaris2 platform Solaris is multi-lib platform which means it provides 32bit user-land together with 32bit and 64bit libraries. The 32bit libraries are located in <somewhere>/lib directories while 64bit libraries are located in <somewhere>/lib/64 directories. This is why GHCi required the fix since otherwise it'll attempt to load /usr/lib/libgmp.so which is 32bit library into 64bit binary process space (GHCi). This of course fails with wrong ELFCLASS32 error message. Another issue was that by default GNU C distributed with Solaris compiles into 32bit binary. We need to enforce compilation to 64bit binary by adding appropriate -m64 option. Test Plan: already built on x86_64-solaris2 Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D68
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index d857706145..782cae5144 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -538,6 +538,12 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
$4="$$4 -arch x86_64"
$5="$$5 -m64"
;;
+ x86_64-unknown-solaris2)
+ $2="$$2 -m64"
+ $3="$$3 -m64"
+ $4="$$4 -m64"
+ $5="$$5 -m64"
+ ;;
alpha-*)
# For now, to suppress the gcc warning "call-clobbered
# register used for global register variable", we simply