summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Heinzeller <dom.heinzeller@icloud.com>2024-07-23 16:54:12 +0200
committerGitHub <noreply@github.com>2024-07-23 07:54:12 -0700
commitfc0955b125c37aa3a05882ec1ac849903ca4f569 (patch)
treee2ae7c4bc412c8b35e39d1b8dafc90dde8e1b147
parent13ba1b96c3a6edb9bffa9634e226e4a06dda84f2 (diff)
downloadspack-fc0955b125c37aa3a05882ec1ac849903ca4f569.tar.gz
spack-fc0955b125c37aa3a05882ec1ac849903ca4f569.tar.bz2
spack-fc0955b125c37aa3a05882ec1ac849903ca4f569.tar.xz
spack-fc0955b125c37aa3a05882ec1ac849903ca4f569.zip
Update and clean up hdf-eos2 package.py to fix build errors with Intel oneAPI (#45399)
-rw-r--r--var/spack/repos/builtin/packages/hdf-eos2/package.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/hdf-eos2/package.py b/var/spack/repos/builtin/packages/hdf-eos2/package.py
index 0f2fdb0d6a..1b41abbf65 100644
--- a/var/spack/repos/builtin/packages/hdf-eos2/package.py
+++ b/var/spack/repos/builtin/packages/hdf-eos2/package.py
@@ -120,9 +120,11 @@ class HdfEos2(AutotoolsPackage):
filter_file("CC=./\\$SZIP_CC", "", "configure")
def flag_handler(self, name, flags):
- if self.spec.compiler.name == "apple-clang":
- if name == "cflags":
+ if name == "cflags":
+ flags.append(self.compiler.cc_pic_flag)
+ if self.spec.compiler.name in ["apple-clang", "oneapi"]:
flags.append("-Wno-error=implicit-function-declaration")
+ flags.append("-Wno-error=implicit-int")
return flags, None, None
@@ -160,15 +162,4 @@ class HdfEos2(AutotoolsPackage):
if "zlib" in self.spec:
extra_args.append("--with-zlib={0}".format(self.spec["zlib-api"].prefix))
- # https://forum.hdfgroup.org/t/help-building-hdf4-with-clang-error-implicit-declaration-of-function-test-mgr-szip-is-invalid-in-c99/7680
- # -fPIC: https://github.com/spack/spack/issues/43792
- if self.spec.satisfies("%apple-clang"):
- extra_args.append(
- "CFLAGS=-Wno-error=implicit-function-declaration {0}".format(
- self.compiler.cc_pic_flag
- )
- )
- else:
- extra_args.append("CFLAGS={0}".format(self.compiler.cc_pic_flag))
-
return extra_args