libiconv: fix building with nvhpc (#43033)
This commit is contained in:
parent
81c9e346dc
commit
4ac51b2127
@ -41,6 +41,17 @@ def configure_args(self):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user