summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorVeselin Dobrev <dobrev@llnl.gov>2018-03-27 14:31:00 -0700
committerVeselin Dobrev <dobrev@llnl.gov>2018-03-27 14:31:00 -0700
commitb1628f0af1c83d48175f71572c69c653d071dd2c (patch)
tree647f1fb276d1fb566761c49c3401525ea9fd9c0d /var
parent6f0472ea871a55cbafb3bbcbe258cf1fff605de7 (diff)
downloadspack-b1628f0af1c83d48175f71572c69c653d071dd2c.tar.gz
spack-b1628f0af1c83d48175f71572c69c653d071dd2c.tar.bz2
spack-b1628f0af1c83d48175f71572c69c653d071dd2c.tar.xz
spack-b1628f0af1c83d48175f71572c69c653d071dd2c.zip
[MUMPS] When building '+shared' put the 'inject_libs' after the object
files to get proper linking - this was needed on Ubuntu 14.04.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mumps/package.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py
index 85d2aab3b1..bff8d7af86 100644
--- a/var/spack/repos/builtin/packages/mumps/package.py
+++ b/var/spack/repos/builtin/packages/mumps/package.py
@@ -232,10 +232,18 @@ class Mumps(Package):
else:
makefile_conf.extend([
'LIBEXT=.so',
- 'AR=$(FL) -shared -Wl,-soname -Wl,%s/$(notdir $@) %s -o' %
+ 'AR=link_cmd() { $(FL) -shared -Wl,-soname '
+ '-Wl,%s/$(notdir $@) -o "$$@" %s; }; link_cmd ' %
(prefix.lib, inject_libs),
- 'RANLIB=echo'
+ 'RANLIB=ls'
])
+ # When building libpord, read AR from Makefile.inc instead of
+ # going through the make command line - this prevents various
+ # problems with the substring "$$@".
+ filter_file(' AR="\$\(AR\)"', '', 'Makefile')
+ filter_file('^(INCLUDES = -I../include)',
+ '\\1\ninclude ../../Makefile.inc',
+ join_path('PORD', 'lib', 'Makefile'))
if using_xl:
# The patches for xl + spectrum-mpi use SAR for linking