summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Rood <jon.rood@nrel.gov>2021-05-19 20:58:07 -0600
committerGitHub <noreply@github.com>2021-05-19 21:58:07 -0500
commit6f75c6f3fa03b43687bc06876956e16d98bd3ccb (patch)
tree74abb9abfcc789121e53be063cb96b4bb3909ac8
parentd2e22d7fe449980e962df0cfb22e2323129bfbf4 (diff)
downloadspack-6f75c6f3fa03b43687bc06876956e16d98bd3ccb.tar.gz
spack-6f75c6f3fa03b43687bc06876956e16d98bd3ccb.tar.bz2
spack-6f75c6f3fa03b43687bc06876956e16d98bd3ccb.tar.xz
spack-6f75c6f3fa03b43687bc06876956e16d98bd3ccb.zip
findutils: use homebrew trick to build findutils 4.8.0 with apple-clang (#23801)
* Use homebrew trick to build findutils 4.8.0 with apple-clang. * Simplify.
-rw-r--r--var/spack/repos/builtin/packages/findutils/package.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/findutils/package.py b/var/spack/repos/builtin/packages/findutils/package.py
index 35e0f65eec..8b72d63015 100644
--- a/var/spack/repos/builtin/packages/findutils/package.py
+++ b/var/spack/repos/builtin/packages/findutils/package.py
@@ -45,10 +45,6 @@ class Findutils(AutotoolsPackage, GNUMirrorPackage):
version('4.1.20', sha256='8c5dd50a5ca54367fa186f6294b81ec7a365e36d670d9feac62227cb513e63ab')
version('4.1', sha256='487ecc0a6c8c90634a11158f360977e5ce0a9a6701502da6cb96a5a7ec143fac')
- # https://www.mail-archive.com/bug-findutils@gnu.org/msg06290.html
- # not just on Catalina, same problem on Mojave with apple-clang@10.0.1
- conflicts('@4.8.0', when='%apple-clang')
-
# The NVIDIA compilers do not currently support some GNU builtins.
# Detect this case and use the fallback path.
patch('nvhpc.patch', when='@4.6.0 %nvhpc')
@@ -57,6 +53,12 @@ class Findutils(AutotoolsPackage, GNUMirrorPackage):
build_directory = 'spack-build'
+ # Taken from here to build 4.8.0 with apple-clang:
+ # https://github.com/Homebrew/homebrew-core/blob/master/Formula/findutils.rb
+ def setup_build_environment(self, spack_env):
+ if self.spec.satisfies('@4.8.0 %apple-clang'):
+ spack_env.set('CFLAGS', '-D__nonnull\\(params\\)=')
+
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)