diff options
author | Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de> | 2024-03-22 02:43:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 01:43:30 +0100 |
commit | 4ac51b2127cc2f94f8e2526a364c63025397dd14 (patch) | |
tree | 52bfdf2163a00a41901a9506f13971a4623e627b /var | |
parent | 81c9e346dc3952865cbe2f0d8f84776345981bd4 (diff) | |
download | spack-4ac51b2127cc2f94f8e2526a364c63025397dd14.tar.gz spack-4ac51b2127cc2f94f8e2526a364c63025397dd14.tar.bz2 spack-4ac51b2127cc2f94f8e2526a364c63025397dd14.tar.xz spack-4ac51b2127cc2f94f8e2526a364c63025397dd14.zip |
libiconv: fix building with nvhpc (#43033)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/libiconv/package.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libiconv/package.py b/var/spack/repos/builtin/packages/libiconv/package.py index efe9584a82..2be3db5a80 100644 --- a/var/spack/repos/builtin/packages/libiconv/package.py +++ b/var/spack/repos/builtin/packages/libiconv/package.py @@ -41,6 +41,17 @@ class Libiconv(AutotoolsPackage, GNUMirrorPackage): args += self.enable_or_disable("libs") args.append("--with-pic") + # Starting version 1.17, libiconv uses the version of gnulib that implements a + # configure-time check for C compiler flags that enables/disables certain warning + # (see https://git.savannah.gnu.org/gitweb/?p=gnulib.git;h=0c8a563f6). Unfortunately, the + # check does not work for compilers that inject extra symbols into the translation unit + # during the preprocessing step. For example, NVHPC injects the definition of the + # __va_list_tag structure, which appears verbatim on the compilation command line as + # additional compiler flags. The easiest way to circumvent the issue is to make the + # configure script believe that the compiler does not support a flag that allows warnings: + if self.spec.satisfies("@1.17:%nvhpc"): + args.append("gl_cv_cc_wallow=none") + # A hack to patch config.guess in the libcharset sub directory copy("./build-aux/config.guess", "libcharset/build-aux/config.guess") return args |