autotools.py: pic flags for %nvhpc (#29920)
This commit is contained in:
		@@ -76,7 +76,7 @@ def patch_config_files(self):
 | 
				
			|||||||
                or self.spec.satisfies('target=riscv64:'))
 | 
					                or self.spec.satisfies('target=riscv64:'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #: Whether or not to update ``libtool``
 | 
					    #: Whether or not to update ``libtool``
 | 
				
			||||||
    #: (currently only for Arm/Clang/Fujitsu compilers)
 | 
					    #: (currently only for Arm/Clang/Fujitsu/NVHPC compilers)
 | 
				
			||||||
    patch_libtool = True
 | 
					    patch_libtool = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #: Targets for ``make`` during the :py:meth:`~.AutotoolsPackage.build`
 | 
					    #: Targets for ``make`` during the :py:meth:`~.AutotoolsPackage.build`
 | 
				
			||||||
@@ -252,7 +252,7 @@ def _set_autotools_environment_variables(self):
 | 
				
			|||||||
    def _do_patch_libtool(self):
 | 
					    def _do_patch_libtool(self):
 | 
				
			||||||
        """If configure generates a "libtool" script that does not correctly
 | 
					        """If configure generates a "libtool" script that does not correctly
 | 
				
			||||||
        detect the compiler (and patch_libtool is set), patch in the correct
 | 
					        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
 | 
					        # Exit early if we are required not to patch libtool
 | 
				
			||||||
        if not self.patch_libtool:
 | 
					        if not self.patch_libtool:
 | 
				
			||||||
@@ -263,9 +263,12 @@ def _do_patch_libtool(self):
 | 
				
			|||||||
            self._patch_libtool(libtool_path)
 | 
					            self._patch_libtool(libtool_path)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _patch_libtool(self, libtool_path):
 | 
					    def _patch_libtool(self, libtool_path):
 | 
				
			||||||
        if self.spec.satisfies('%arm')\
 | 
					        if (
 | 
				
			||||||
                or self.spec.satisfies('%clang')\
 | 
					            self.spec.satisfies('%arm') or
 | 
				
			||||||
                or self.spec.satisfies('%fj'):
 | 
					            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('wl=""\n', 'wl="-Wl,"\n', libtool_path)
 | 
				
			||||||
            fs.filter_file('pic_flag=""\n',
 | 
					            fs.filter_file('pic_flag=""\n',
 | 
				
			||||||
                           'pic_flag="{0}"\n'
 | 
					                           'pic_flag="{0}"\n'
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user