summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorm-shunji <76516098+m-shunji@users.noreply.github.com>2024-03-08 15:03:18 +0900
committerGitHub <noreply@github.com>2024-03-08 07:03:18 +0100
commitc218ee50e9fe4f2069f443b6001b49679ee12604 (patch)
tree91532ca0ee6af8526ad587940f4d361a2402743d
parent8ff7a203209fbfb65dfdffdb9a3dc967bc4bff22 (diff)
downloadspack-c218ee50e9fe4f2069f443b6001b49679ee12604.tar.gz
spack-c218ee50e9fe4f2069f443b6001b49679ee12604.tar.bz2
spack-c218ee50e9fe4f2069f443b6001b49679ee12604.tar.xz
spack-c218ee50e9fe4f2069f443b6001b49679ee12604.zip
libint: add link option for fujitsu compiler (#42233)
Co-authored-by: inada-yoshie <inada.yoshie@fujitsu.com>
-rw-r--r--var/spack/repos/builtin/packages/libint/package.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py
index 889e98776e..2dd4cd97a8 100644
--- a/var/spack/repos/builtin/packages/libint/package.py
+++ b/var/spack/repos/builtin/packages/libint/package.py
@@ -117,6 +117,9 @@ class Libint(AutotoolsPackage):
env.set("CFLAGS", self.optflags)
env.set("CXXFLAGS", self.optflags)
+ if self.spec.satisfies("%fj"):
+ env.set("LDFLAGS", "--linkfortran")
+
# Change AR to xiar if we compile with Intel and we
# find the executable
if "%intel" in self.spec and which("xiar"):
@@ -238,11 +241,18 @@ class Libint(AutotoolsPackage):
def install(self, spec, prefix):
with working_dir(os.path.join(self.build_directory, "generated")):
make("install")
+ if "+fortran" in self.spec:
+ mkdirp(prefix.include)
+ install(join_path("fortran", "*.mod"), prefix.include)
def patch(self):
# Use Fortran compiler to link the Fortran example, not the C++
# compiler
if "+fortran" in self.spec:
- filter_file(
- "$(CXX) $(CXXFLAGS)", "$(FC) $(FCFLAGS)", "export/fortran/Makefile", string=True
- )
+ if not self.spec.satisfies("%fj"):
+ filter_file(
+ "$(CXX) $(CXXFLAGS)",
+ "$(FC) $(FCFLAGS)",
+ "export/fortran/Makefile",
+ string=True,
+ )