From 43577beb9c16e37134db8e6c4fade21f9b729cde Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 7 Apr 2022 14:52:47 +0200 Subject: autotools.py: pic flags for %nvhpc (#29920) --- lib/spack/spack/build_systems/autotools.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index a644c92622..08c65bcda2 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -76,7 +76,7 @@ class AutotoolsPackage(PackageBase): or self.spec.satisfies('target=riscv64:')) #: Whether or not to update ``libtool`` - #: (currently only for Arm/Clang/Fujitsu compilers) + #: (currently only for Arm/Clang/Fujitsu/NVHPC compilers) patch_libtool = True #: Targets for ``make`` during the :py:meth:`~.AutotoolsPackage.build` @@ -252,7 +252,7 @@ To resolve this problem, please try the following: def _do_patch_libtool(self): """If configure generates a "libtool" script that does not correctly detect the compiler (and patch_libtool is set), patch in the correct - flags for the Arm, Clang/Flang, and Fujitsu compilers.""" + flags for the Arm, Clang/Flang, Fujitsu and NVHPC compilers.""" # Exit early if we are required not to patch libtool if not self.patch_libtool: @@ -263,9 +263,12 @@ To resolve this problem, please try the following: self._patch_libtool(libtool_path) def _patch_libtool(self, libtool_path): - if self.spec.satisfies('%arm')\ - or self.spec.satisfies('%clang')\ - or self.spec.satisfies('%fj'): + if ( + self.spec.satisfies('%arm') or + self.spec.satisfies('%clang') or + self.spec.satisfies('%fj') or + self.spec.satisfies('%nvhpc') + ): fs.filter_file('wl=""\n', 'wl="-Wl,"\n', libtool_path) fs.filter_file('pic_flag=""\n', 'pic_flag="{0}"\n' -- cgit v1.2.3-60-g2f50