Merge pull request #855 from citibeth/efischer/160427-OpenblasFix
openblas: Added +fpic variant to package.
This commit is contained in:
		| @@ -14,6 +14,7 @@ class Openblas(Package): | ||||
|  | ||||
|     variant('shared', default=True, description="Build shared libraries as well as static libs.") | ||||
|     variant('openmp', default=True, description="Enable OpenMP support.") | ||||
|     variant('fpic', default=True, description="Build position independent code") | ||||
|  | ||||
|     # virtual dependency | ||||
|     provides('blas') | ||||
| @@ -33,6 +34,8 @@ def install(self, spec, prefix): | ||||
|         if '+shared' in spec: | ||||
|             make_targets += ['shared'] | ||||
|         else: | ||||
|             if '+fpic' in spec: | ||||
|                 make_defs.extend(['CFLAGS=-fPIC', 'FFLAGS=-fPIC']) | ||||
|             make_defs += ['NO_SHARED=1'] | ||||
|  | ||||
|         # fix missing _dggsvd_ and _sggsvd_ | ||||
| @@ -119,7 +122,7 @@ def check_install(self, spec): | ||||
|             # TODO: Automate these path and library settings | ||||
|             cc('-c', "-I%s" % join_path(spec.prefix, "include"), "check.c") | ||||
|             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: | ||||
|                 check = Executable('./check') | ||||
|                 output = check(return_output=True) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Todd Gamblin
					Todd Gamblin