diff options
author | Erik Schnetter <schnetter@gmail.com> | 2022-01-17 04:14:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 10:14:39 +0100 |
commit | 350d2da8b9db66be324bcebbea808662d7e7df1c (patch) | |
tree | 7b6091627f705ccfe62811c53b7e6c79acc231a4 /var | |
parent | 20bccc384374a3abc09b5f14c8436e55e60c5fcb (diff) | |
download | spack-350d2da8b9db66be324bcebbea808662d7e7df1c.tar.gz spack-350d2da8b9db66be324bcebbea808662d7e7df1c.tar.bz2 spack-350d2da8b9db66be324bcebbea808662d7e7df1c.tar.xz spack-350d2da8b9db66be324bcebbea808662d7e7df1c.zip |
findutils: ensure __nonnull is defined on macOS (#28316)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/findutils/nonnull.patch | 11 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/findutils/package.py | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/findutils/nonnull.patch b/var/spack/repos/builtin/packages/findutils/nonnull.patch new file mode 100644 index 0000000000..0103b5d9b3 --- /dev/null +++ b/var/spack/repos/builtin/packages/findutils/nonnull.patch @@ -0,0 +1,11 @@ +--- a/gl/lib/malloc/dynarray-skeleton.c ++++ b/gl/lib/malloc/dynarray-skeleton.c +@@ -85,6 +85,8 @@ + (if DYNARRAY_FINAL_TYPE is not defined) + */ + + #include <malloc/dynarray.h> ++#undef __nonnull ++#define __nonnull(x) + + #include <errno.h> diff --git a/var/spack/repos/builtin/packages/findutils/package.py b/var/spack/repos/builtin/packages/findutils/package.py index d529bf8147..eefa00783c 100644 --- a/var/spack/repos/builtin/packages/findutils/package.py +++ b/var/spack/repos/builtin/packages/findutils/package.py @@ -51,6 +51,11 @@ class Findutils(AutotoolsPackage, GNUMirrorPackage): patch('nvhpc.patch', when='@4.6.0 %nvhpc') # Workaround bug where __LONG_WIDTH__ is not defined patch('nvhpc-long-width.patch', when='@4.8.0:4.8 %nvhpc') + # Auto-detecting whether `__attribute__((__nonnull__(...)))` is supported + # does not work for GCC on macOS + # <https://savannah.gnu.org/bugs/?func=detailitem&item_id=59972>; we thus + # disable this attribute manually + patch('nonnull.patch') build_directory = 'spack-build' |