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
@@ -38,7 +38,7 @@ class Superlu(Package):
|
||||
version('5.2.1', '3a1a9bff20cb06b7d97c46d337504447')
|
||||
version('4.3', 'b72c6309f25e9660133007b82621ba7c')
|
||||
|
||||
variant('fpic', default=True,
|
||||
variant('pic', default=True,
|
||||
description='Build with position independent code')
|
||||
|
||||
depends_on('cmake', when='@5.2.1:', type='build')
|
||||
@@ -51,7 +51,7 @@ def install(self, spec, prefix):
|
||||
'-DBLAS_blas_LIBRARY={0}'.format(spec['blas'].libs.joined())
|
||||
]
|
||||
|
||||
if '+fpic' in spec:
|
||||
if '+pic' in spec:
|
||||
cmake_args.extend([
|
||||
'-DCMAKE_POSITION_INDEPENDENT_CODE=ON'
|
||||
])
|
||||
@@ -89,7 +89,7 @@ def install(self, spec, prefix):
|
||||
'CDEFS = -DAdd_'
|
||||
])
|
||||
|
||||
if '+fpic' in spec:
|
||||
if '+pic' in spec:
|
||||
config.extend([
|
||||
# Use these lines instead when pic_flag capability arrives
|
||||
'CFLAGS = -O3 {0}'.format(self.compiler.pic_flag),
|
||||
|
Reference in New Issue
Block a user