Changed every 'fpic' variant to 'pic' (#4969)
* Changed every 'fpic' variant to 'pic'. fixes #2463 Every variant that activates compilation of position independent code has been changed to 'pic'. Hardcoded compiler flags in packages have been substituted with `self.compiler.pic_flag`. * Changed literal uses of '-fpic' to 'self.compiler.pic_flag'
This commit is contained in:

committed by
GitHub

parent
452f382293
commit
9be294de31
@@ -91,7 +91,7 @@ def install(self, spec, prefix):
|
||||
raise InstallError('METIS@:4 does not support the following '
|
||||
'variants: gdb, int64, real64.')
|
||||
|
||||
options = ['COPTIONS=-fPIC']
|
||||
options = ['COPTIONS={0}'.format(self.compiler.pic_flag)]
|
||||
if '+debug' in spec:
|
||||
options.append('OPTFLAGS=-g -O0')
|
||||
make(*options)
|
||||
@@ -119,7 +119,7 @@ def install(self, spec, prefix):
|
||||
install(sharefile, prefix.share)
|
||||
|
||||
if '+shared' in spec:
|
||||
shared_flags = ['-fPIC', '-shared']
|
||||
shared_flags = [self.compiler.pic_flag, '-shared']
|
||||
if sys.platform == 'darwin':
|
||||
shared_suffix = 'dylib'
|
||||
shared_flags.extend(['-Wl,-all_load', 'libmetis.a'])
|
||||
|
Reference in New Issue
Block a user