add fPIC to MUMPS when building shared libs
This commit is contained in:
parent
fdd7e91ba0
commit
3e39daeb12
@ -70,6 +70,9 @@ def write_makefile_inc(self):
|
||||
|
||||
makefile_conf.append("ORDERINGSF = %s" % (' '.join(orderings)))
|
||||
|
||||
# when building shared libs need -fPIC, otherwise
|
||||
# /usr/bin/ld: graph.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
|
||||
fpic = '-fPIC' if '+shared' in self.spec else ''
|
||||
# TODO: test this part, it needs a full blas, scalapack and
|
||||
# partitionning environment with 64bit integers
|
||||
if '+idx64' in self.spec:
|
||||
@ -77,14 +80,14 @@ def write_makefile_inc(self):
|
||||
# the fortran compilation flags most probably are
|
||||
# working only for intel and gnu compilers this is
|
||||
# perhaps something the compiler should provide
|
||||
['OPTF = -O -DALLOW_NON_INIT %s' % '-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8',
|
||||
'OPTL = -O ',
|
||||
'OPTC = -O -DINTSIZE64'])
|
||||
['OPTF = %s -O -DALLOW_NON_INIT %s' % (fpic,'-fdefault-integer-8' if self.compiler.name == "gcc" else '-i8'),
|
||||
'OPTL = %s -O ' % fpic,
|
||||
'OPTC = %s -O -DINTSIZE64' % fpic])
|
||||
else:
|
||||
makefile_conf.extend(
|
||||
['OPTF = -O -DALLOW_NON_INIT',
|
||||
'OPTL = -O ',
|
||||
'OPTC = -O '])
|
||||
['OPTF = %s -O -DALLOW_NON_INIT' % fpic,
|
||||
'OPTL = %s -O ' % fpic,
|
||||
'OPTC = %s -O ' % fpic])
|
||||
|
||||
|
||||
if '+mpi' in self.spec:
|
||||
|
Loading…
Reference in New Issue
Block a user