Skip to content

Commit

Permalink
findutils: use homebrew trick to build findutils 4.8.0 with apple-cla…
Browse files Browse the repository at this point in the history
…ng (spack#23801)

* Use homebrew trick to build findutils 4.8.0 with apple-clang.

* Simplify.
  • Loading branch information
jrood-nrel authored May 20, 2021
1 parent d2e22d7 commit 6f75c6f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions var/spack/repos/builtin/packages/findutils/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ def url_for_version(self, version):
version('4.1.20', sha256='8c5dd50a5ca54367fa186f6294b81ec7a365e36d670d9feac62227cb513e63ab')
version('4.1', sha256='487ecc0a6c8c90634a11158f360977e5ce0a9a6701502da6cb96a5a7ec143fac')

# https://www.mail-archive.com/[email protected]/msg06290.html
# not just on Catalina, same problem on Mojave with [email protected]
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')
Expand All @@ -57,6 +53,12 @@ def url_for_version(self, version):

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)
Expand Down

0 comments on commit 6f75c6f

Please sign in to comment.