Skip to content
Snippets Groups Projects
Commit b75a3e11 authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Merge pull request #855 from citibeth/efischer/160427-OpenblasFix

openblas: Added +fpic variant to package.
parents 8773a0b7 71ca837a
Branches
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ class Openblas(Package): ...@@ -14,6 +14,7 @@ class Openblas(Package):
variant('shared', default=True, description="Build shared libraries as well as static libs.") variant('shared', default=True, description="Build shared libraries as well as static libs.")
variant('openmp', default=True, description="Enable OpenMP support.") variant('openmp', default=True, description="Enable OpenMP support.")
variant('fpic', default=True, description="Build position independent code")
# virtual dependency # virtual dependency
provides('blas') provides('blas')
...@@ -33,6 +34,8 @@ def install(self, spec, prefix): ...@@ -33,6 +34,8 @@ def install(self, spec, prefix):
if '+shared' in spec: if '+shared' in spec:
make_targets += ['shared'] make_targets += ['shared']
else: else:
if '+fpic' in spec:
make_defs.extend(['CFLAGS=-fPIC', 'FFLAGS=-fPIC'])
make_defs += ['NO_SHARED=1'] make_defs += ['NO_SHARED=1']
# fix missing _dggsvd_ and _sggsvd_ # fix missing _dggsvd_ and _sggsvd_
...@@ -119,7 +122,7 @@ def check_install(self, spec): ...@@ -119,7 +122,7 @@ def check_install(self, spec):
# TODO: Automate these path and library settings # TODO: Automate these path and library settings
cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c")
cc('-o', "check", "check.o", cc('-o', "check", "check.o",
"-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas") "-L%s" % join_path(spec.prefix, "lib"), "-llapack", "-lblas", "-lpthread")
try: try:
check = Executable('./check') check = Executable('./check')
output = check(return_output=True) output = check(return_output=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment