summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDom Heinzeller <dom.heinzeller@icloud.com>2023-05-11 14:27:43 -0600
committerGitHub <noreply@github.com>2023-05-11 16:27:43 -0400
commit0e87243284d7c8992ae0cbb9e46348557119a117 (patch)
tree1ae218c7bb912cf2cceec7a6d1e6fe58c88a9dda
parent384f5f99605526b09de694729daa4eb759ed03b8 (diff)
downloadspack-0e87243284d7c8992ae0cbb9e46348557119a117.tar.gz
spack-0e87243284d7c8992ae0cbb9e46348557119a117.tar.bz2
spack-0e87243284d7c8992ae0cbb9e46348557119a117.tar.xz
spack-0e87243284d7c8992ae0cbb9e46348557119a117.zip
libpng package: fix build error on macOS arm64 (#37613)
Turn off ARM NEON support on MacOS arm64 Co-authored-by: Stephen Herbener <stephen.herbener@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/libpng/package.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py
index 49b7a16d0d..befa55f567 100644
--- a/var/spack/repos/builtin/packages/libpng/package.py
+++ b/var/spack/repos/builtin/packages/libpng/package.py
@@ -41,9 +41,12 @@ class Libpng(CMakePackage):
class CMakeBuilder(CMakeBuilder):
def cmake_args(self):
- return [
+ args = [
self.define("CMAKE_CXX_FLAGS", self.spec["zlib"].headers.include_flags),
self.define("ZLIB_ROOT", self.spec["zlib"].prefix),
self.define("PNG_SHARED", "shared" in self.spec.variants["libs"].value),
self.define("PNG_STATIC", "static" in self.spec.variants["libs"].value),
]
+ if self.spec.satisfies("platform=darwin target=aarch64:"):
+ args.append("-DPNG_ARM_NEON=off")
+ return args