diff options
author | Gregory Lee <lee218@llnl.gov> | 2021-02-18 09:39:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-18 09:39:20 -0800 |
commit | 3364e5550ffa7f4af1728ae3b97d2be5781041a3 (patch) | |
tree | 4eb6a797e3ee5e3e77c8a6dc87f6362168cff91c | |
parent | 8e3ac8577f16ceef66dc3b55b3f82f7bde897b3b (diff) | |
download | spack-3364e5550ffa7f4af1728ae3b97d2be5781041a3.tar.gz spack-3364e5550ffa7f4af1728ae3b97d2be5781041a3.tar.bz2 spack-3364e5550ffa7f4af1728ae3b97d2be5781041a3.tar.xz spack-3364e5550ffa7f4af1728ae3b97d2be5781041a3.zip |
patches to apply to gdbm and m4 when using oneapi compiler (#21740)
-rw-r--r-- | var/spack/repos/builtin/packages/gdbm/package.py | 1 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/m4/oneapi.patch | 18 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/m4/package.py | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gdbm/package.py b/var/spack/repos/builtin/packages/gdbm/package.py index ff5421e83d..294206d3bf 100644 --- a/var/spack/repos/builtin/packages/gdbm/package.py +++ b/var/spack/repos/builtin/packages/gdbm/package.py @@ -30,6 +30,7 @@ class Gdbm(AutotoolsPackage, GNUMirrorPackage): patch('gdbm.patch', when='%clang@11:') patch('gdbm.patch', when='%cce@11:') patch('gdbm.patch', when='%aocc@2:') + patch('gdbm.patch', when='%oneapi') def configure_args(self): diff --git a/var/spack/repos/builtin/packages/m4/oneapi.patch b/var/spack/repos/builtin/packages/m4/oneapi.patch new file mode 100644 index 0000000000..d659c1e75c --- /dev/null +++ b/var/spack/repos/builtin/packages/m4/oneapi.patch @@ -0,0 +1,18 @@ +--- a/lib/xalloc-oversized.h 2020-08-07 11:04:56.154698639 -0700 ++++ b/lib/xalloc-oversized.h 2020-08-07 11:06:11.667997389 -0700 +@@ -46,13 +46,13 @@ + positive and N must be nonnegative. This is a macro, not a + function, so that it works correctly even when SIZE_MAX < N. */ + +-#if 7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p) ++#if ((7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)) && !defined __INTEL_LLVM_COMPILER) + # define xalloc_oversized(n, s) \ + __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) + #elif ((5 <= __GNUC__ \ + || (__has_builtin (__builtin_mul_overflow) \ + && __has_builtin (__builtin_constant_p))) \ +- && !__STRICT_ANSI__) ++ && !__STRICT_ANSI__ && !defined __INTEL_LLVM_COMPILER) + # define xalloc_oversized(n, s) \ + (__builtin_constant_p (n) && __builtin_constant_p (s) \ + ? __xalloc_oversized (n, s) \ diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py index 23f802d9d1..cc18685faf 100644 --- a/var/spack/repos/builtin/packages/m4/package.py +++ b/var/spack/repos/builtin/packages/m4/package.py @@ -18,6 +18,7 @@ class M4(AutotoolsPackage, GNUMirrorPackage): patch('gnulib-pgi.patch', when='@1.4.18') patch('pgi.patch', when='@1.4.17') patch('nvhpc.patch', when='%nvhpc') + patch('oneapi.patch', when='%oneapi') # from: https://github.com/Homebrew/homebrew-core/blob/master/Formula/m4.rb # Patch credit to Jeremy Huddleston Sequoia <jeremyhu@apple.com> patch('secure_snprintf.patch', when='os = highsierra') |