Armadillo: fix for linker error with apple-clang 15 (#44551)

* Armadillo needs to use -ld_classic with apple-clang 15
This commit is contained in:
Chris Marsh 2024-06-05 02:02:43 -06:00 committed by GitHub
parent bc738cea32
commit 858b185a0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,6 +42,14 @@ class Armadillo(CMakePackage):
# platform's compiler is adding `#define linux 1`.
patch("undef_linux.patch", when="platform=linux")
def flag_handler(self, name, flags):
spec = self.spec
if name == "ldflags":
if spec.satisfies("%apple-clang@15:"):
flags.append("-Wl,-ld_classic")
return (flags, None, None)
def patch(self):
# Do not include Find{BLAS_type} because we are specifying the
# BLAS/LAPACK libraries explicitly.