openblas: fix macOS build when using XCode 15 or newer (#41420)

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
This commit is contained in:
Ben Wibking 2023-12-05 03:53:54 -05:00 committed by GitHub
parent 456f2ca40f
commit 8727195b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -93,6 +93,9 @@ class Openblas(CMakePackage, MakefilePackage):
provides("lapack@3.9.1:", when="@0.3.15:")
provides("lapack@3.7.0", when="@0.2.20")
# https://github.com/OpenMathLib/OpenBLAS/pull/4328
patch("xcode15-fortran.patch", when="@0.3.25 %apple-clang@15:")
# https://github.com/xianyi/OpenBLAS/pull/2519/files
patch("ifort-msvc.patch", when="%msvc")

View File

@ -0,0 +1,22 @@
From 47b03fd4b4ce7bc51d5b56397e52e6da3c5f3f36 Mon Sep 17 00:00:00 2001
From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Date: Sat, 18 Nov 2023 23:45:02 +0100
Subject: [PATCH] Copy XCode15-specific workaround to Fortran flags to fix
build of tests
---
Makefile.system | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.system b/Makefile.system
index 1b84195e45..ff06e503cb 100644
--- a/Makefile.system
+++ b/Makefile.system
@@ -407,6 +407,7 @@ XCVER = $(shell pkgutil --pkg-info=com.apple.pkg.CLTools_Executables |awk '/vers
endif
ifeq (x$(XCVER), x 15)
CCOMMON_OPT += -Wl,-ld_classic
+FCOMMON_OPT += -Wl,-ld_classic
endif
endif