From c7de8d0cdcffe74163b8849c9ec4408af429a789 Mon Sep 17 00:00:00 2001 From: eklee15 Date: Thu, 25 May 2017 17:23:26 -0400 Subject: [PATCH] Added pgi support for superlu-dist package (#4343) * Added pgi support for superlu-dist package * added self.compiler.pic_flag --- var/spack/repos/builtin/packages/superlu-dist/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index e7d7b1587d..546a35b6af 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -71,11 +71,14 @@ def install(self, spec, prefix): 'ARCHFLAGS = cr', 'RANLIB = true', 'CC = {0}'.format(self.spec['mpi'].mpicc), - 'CFLAGS = -fPIC -std=c99 -O2 %s %s %s' % ( + 'CFLAGS = %s %s -O2 %s %s %s' % ( + self.compiler.pic_flag, + '' if '%pgi' in spec else '-std=c99', spec['parmetis'].headers.cpp_flags, spec['metis'].headers.cpp_flags, '-D_LONGINT' if '+int64' in spec else ''), - 'NOOPTS = -fPIC -std=c99', + 'NOOPTS = %s -std=c99' % ( + self.compiler.pic_flag), 'FORTRAN = {0}'.format(self.spec['mpi'].mpif77), 'F90FLAGS = -O2', 'LOADER = {0}'.format(self.spec['mpi'].mpif77),