diff options
author | Erik Schnetter <schnetter@gmail.com> | 2023-01-10 05:20:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 11:20:30 +0100 |
commit | 954e24117439c81773bda23a86e3b0fd3eef2e70 (patch) | |
tree | a343410fac42023925569fd0c5873ce5a418c990 /var | |
parent | ae3a1618a2c0f75be55fdb477a079cca30f93cfc (diff) | |
download | spack-954e24117439c81773bda23a86e3b0fd3eef2e70.tar.gz spack-954e24117439c81773bda23a86e3b0fd3eef2e70.tar.bz2 spack-954e24117439c81773bda23a86e3b0fd3eef2e70.tar.xz spack-954e24117439c81773bda23a86e3b0fd3eef2e70.zip |
pgplot: Correct building shared libraries (#34846)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/pgplot/package.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/pgplot/package.py b/var/spack/repos/builtin/packages/pgplot/package.py index 9425aacba6..acd9d3fab6 100644 --- a/var/spack/repos/builtin/packages/pgplot/package.py +++ b/var/spack/repos/builtin/packages/pgplot/package.py @@ -64,10 +64,10 @@ class Pgplot(MakefilePackage): "@CCOMPL@": spack_cc, "@CFLAGC@": "-Wall -fPIC -DPG_PPU -O -std=c89 " + "-Wno-error=implicit-function-declaration", - "@CFLAGD@": "-O2", + "@CFLAGD@": "-O2 -fPIC", "@FCOMPL@": spack_fc, "@FFLAGC@": "-Wall -fPIC -O -ffixed-line-length-none" + fib, - "@FFLAGD@": libs + " -fno-backslash", + "@FFLAGD@": "-fPIC " + libs + " -fno-backslash", "@LIBS@": libs + " -lgfortran", "@SHARED_LD@": spack_cc + " -shared -o $SHARED_LIB", "@SHARED_LIB_LIBS@": libs + " -lgfortran", @@ -167,7 +167,11 @@ class Pgplot(MakefilePackage): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("lib*pgplot", root=self.prefix, shared=shared, recursive=True) + if shared: + libnames = ["libpgplot"] + else: + libnames = ["libcpgplot", "libpgplot"] + return find_libraries(libnames, root=self.prefix, shared=shared, recursive=True) def setup_run_environment(self, env): env.set("PGPLOT_FONT", self.prefix.include + "/grfont.dat") |