From 74c574b368ad697f53aae39bf3c9434a2ad5ce63 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sat, 6 Jul 2024 22:12:32 +0800 Subject: [PATCH] OpenBLAS: update to 0.3.27; OpenBLAS-devel: update to 20240704 --- math/OpenBLAS/Portfile | 28 ++++------- ...70-KERNEL.PPCG4-unbreak-CMake-parsing.diff | 47 ------------------- .../files/patch-OpenBLAS-old-macos.diff | 15 ------ .../files/patch-ar-options-old-macos.diff | 10 ---- ...r.c-add-CPU_SUBTYPE_POWERPC_7400-case.diff | 21 --------- ...of-too-long-args-without-DYNAMIC_ARCH.diff | 32 ------------- .../OpenBLAS/files/patch-libnoarch.devel.diff | 18 ------- ...tch-openblas.pc-fixed-version-and-url.diff | 16 ------- ...ake-fix-arch-detection-for-Darwin-Pow.diff | 31 ------------ math/OpenBLAS/files/patch-xcode15-fix.diff | 14 ------ 10 files changed, 10 insertions(+), 222 deletions(-) delete mode 100644 math/OpenBLAS/files/patch-KERNEL.PPC970-KERNEL.PPCG4-unbreak-CMake-parsing.diff delete mode 100644 math/OpenBLAS/files/patch-OpenBLAS-old-macos.diff delete mode 100644 math/OpenBLAS/files/patch-ar-options-old-macos.diff delete mode 100644 math/OpenBLAS/files/patch-cpuid_power.c-add-CPU_SUBTYPE_POWERPC_7400-case.diff delete mode 100644 math/OpenBLAS/files/patch-enable-overstep-of-too-long-args-without-DYNAMIC_ARCH.diff delete mode 100644 math/OpenBLAS/files/patch-libnoarch.devel.diff delete mode 100644 math/OpenBLAS/files/patch-openblas.pc-fixed-version-and-url.diff delete mode 100644 math/OpenBLAS/files/patch-system_check.cmake-fix-arch-detection-for-Darwin-Pow.diff delete mode 100644 math/OpenBLAS/files/patch-xcode15-fix.diff diff --git a/math/OpenBLAS/Portfile b/math/OpenBLAS/Portfile index 2db20981dec3b..38e92fc78bddb 100644 --- a/math/OpenBLAS/Portfile +++ b/math/OpenBLAS/Portfile @@ -27,12 +27,12 @@ if {${os.major} < 9} { subport OpenBLAS-devel {} if {[string first "-devel" $subport] > 0} { - github.setup OpenMathLib OpenBLAS b1ae777afb071f3a80e6646ceaa587c4d2e10d23 + github.setup OpenMathLib OpenBLAS e1eef56e0510fecd5a05df9a8fddaf63a3d91ef0 github.tarball_from archive - version 20240209-[string range ${github.version} 0 7] - checksums rmd160 8666fb64ff9128a4674772e243e02c22b1a1b799 \ - sha256 8f45efabd83bd1bcefd721a0a72330172f7f6ee0d725099713c7a2a88c805e24 \ - size 24580697 + version 20240704-[string range ${github.version} 0 7] + checksums rmd160 0612839aa8727b4cc76a4ac35b93bac8ea3920a9 \ + sha256 6f501ad13a94eef28c55b301018b85ec4b7eb4c38f4ac4b021ef953d7de581e4 \ + size 24634029 revision 0 conflicts OpenBLAS @@ -46,25 +46,17 @@ if {[string first "-devel" $subport] > 0} { } else { - github.setup OpenMathLib OpenBLAS 0.3.25 v + github.setup OpenMathLib OpenBLAS 0.3.27 v github.tarball_from releases - checksums rmd160 eea6fe2c33762df4c47c7241808dabbdb085eed3 \ - sha256 4c25cb30c4bb23eddca05d7d0a85997b8db6144f5464ba7f8c09ce91e2f35543 \ - size 24073168 - revision 6 + checksums rmd160 1ca534ed13409fb55ea384e294b9ff0fcfcdc483 \ + sha256 aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897 \ + size 24493704 + revision 0 conflicts OpenBLAS-devel patchfiles patch-libnoarch.release.diff \ - patch-xcode15-fix.diff \ - patch-openblas.pc-fixed-version-and-url.diff \ - patch-enable-overstep-of-too-long-args-without-DYNAMIC_ARCH.diff \ - patch-ar-options-old-macos.diff \ - patch-OpenBLAS-old-macos.diff \ patch-OpenBLAS-i386-Apple.diff \ - patch-system_check.cmake-fix-arch-detection-for-Darwin-Pow.diff \ - patch-cpuid_power.c-add-CPU_SUBTYPE_POWERPC_7400-case.diff \ - patch-KERNEL.PPC970-KERNEL.PPCG4-unbreak-CMake-parsing.diff \ patch-cc.cmake-add-optflags-for-G5-and-G4-kernels.diff \ patch-cc.cmake-use-force_cpusubtype_ALL-for-Darwin-PPC.diff \ patch-PPC970-drop-mcpu-970-which-seems-to-produce-faulty-c.diff diff --git a/math/OpenBLAS/files/patch-KERNEL.PPC970-KERNEL.PPCG4-unbreak-CMake-parsing.diff b/math/OpenBLAS/files/patch-KERNEL.PPC970-KERNEL.PPCG4-unbreak-CMake-parsing.diff deleted file mode 100644 index db86b1f088995..0000000000000 --- a/math/OpenBLAS/files/patch-KERNEL.PPC970-KERNEL.PPCG4-unbreak-CMake-parsing.diff +++ /dev/null @@ -1,47 +0,0 @@ -From 764b74994dfd5bcba1a592d77e8720b8b5ead52a Mon Sep 17 00:00:00 2001 -From: barracuda156 -Date: Wed, 13 Dec 2023 19:23:50 +0800 -Subject: [PATCH] KERNEL.PPC970, KERNEL.PPCG4: unbreak CMake parsing - -Fixes: https://github.com/OpenMathLib/OpenBLAS/issues/4366 ---- - kernel/power/KERNEL.PPC970 | 8 ++++---- - kernel/power/KERNEL.PPCG4 | 4 ++-- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git kernel/power/KERNEL.PPC970 kernel/power/KERNEL.PPC970 -index a99fb7d96..fee5fa529 100644 ---- kernel/power/KERNEL.PPC970 -+++ kernel/power/KERNEL.PPC970 -@@ -1,11 +1,11 @@ - ifeq ($(__BYTE_ORDER__),__ORDER_BIG_ENDIAN__) - SGEMMKERNEL = gemm_kernel.S --SGEMMINCOPY = --SGEMMITCOPY = -+SGEMMINCOPY = -+SGEMMITCOPY = - SGEMMONCOPY = ../generic/gemm_ncopy_4.c - SGEMMOTCOPY = ../generic/gemm_tcopy_4.c --SGEMMINCOPYOBJ = --SGEMMITCOPYOBJ = -+SGEMMINCOPYOBJ = -+SGEMMITCOPYOBJ = - SGEMMONCOPYOBJ = sgemm_oncopy$(TSUFFIX).$(SUFFIX) - SGEMMOTCOPYOBJ = sgemm_otcopy$(TSUFFIX).$(SUFFIX) - else -diff --git kernel/power/KERNEL.PPCG4 kernel/power/KERNEL.PPCG4 -index 1bdd3119e..c73601cee 100644 ---- kernel/power/KERNEL.PPCG4 -+++ kernel/power/KERNEL.PPCG4 -@@ -96,9 +96,9 @@ CGEMMINCOPY = - CGEMMONCOPY = - CGEMMONCOPY = ../generic/zgemm_ncopy_2.c - CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c --CGEMMINCOPYOBJ = -+CGEMMINCOPYOBJ = - #cgemm_incopy$(TSUFFIX).$(SUFFIX) --CGEMMITCOPYOBJ = -+CGEMMITCOPYOBJ = - #cgemm_itcopy$(TSUFFIX).$(SUFFIX) - CGEMMONCOPYOBJ = cgemm_oncopy$(TSUFFIX).$(SUFFIX) - CGEMMOTCOPYOBJ = cgemm_otcopy$(TSUFFIX).$(SUFFIX) diff --git a/math/OpenBLAS/files/patch-OpenBLAS-old-macos.diff b/math/OpenBLAS/files/patch-OpenBLAS-old-macos.diff deleted file mode 100644 index ba92bda9b73d9..0000000000000 --- a/math/OpenBLAS/files/patch-OpenBLAS-old-macos.diff +++ /dev/null @@ -1,15 +0,0 @@ -https://github.com/OpenMathLib/OpenBLAS/pull/4351 - -diff --git cmake/system_check.cmake cmake/system_check.cmake -index 49b9863e3..c9671b379 100644 ---- cmake/system_check.cmake -+++ cmake/system_check.cmake -@@ -46,7 +46,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64.*") - set(LOONGARCH64 1) - elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64.*") - set(RISCV64 1) --elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*") -+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*" OR (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*")) - if (NOT BINARY) - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - set(X86_64 1) diff --git a/math/OpenBLAS/files/patch-ar-options-old-macos.diff b/math/OpenBLAS/files/patch-ar-options-old-macos.diff deleted file mode 100644 index 2b6913e77fc3b..0000000000000 --- a/math/OpenBLAS/files/patch-ar-options-old-macos.diff +++ /dev/null @@ -1,10 +0,0 @@ -diff --git CMakeLists.txt CMakeLists.txt -index 7c6b96f41..7e5d1e0fb 100644 ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -257,1 +257,1 @@ "sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' " -- "sh -c '${CMAKE_AR} -ru libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' " -+ "sh -c '${CMAKE_AR} -rs libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' " -@@ -266,1 +266,1 @@ "sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' " -- "sh -c '${CMAKE_AR} -ru libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' " -+ "sh -c '${CMAKE_AR} -rs libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' " diff --git a/math/OpenBLAS/files/patch-cpuid_power.c-add-CPU_SUBTYPE_POWERPC_7400-case.diff b/math/OpenBLAS/files/patch-cpuid_power.c-add-CPU_SUBTYPE_POWERPC_7400-case.diff deleted file mode 100644 index 251dfdd4ca795..0000000000000 --- a/math/OpenBLAS/files/patch-cpuid_power.c-add-CPU_SUBTYPE_POWERPC_7400-case.diff +++ /dev/null @@ -1,21 +0,0 @@ -From 9dbc8129b3987fd038585904e612a8ff0f62f947 Mon Sep 17 00:00:00 2001 -From: barracuda156 -Date: Mon, 11 Dec 2023 21:09:06 +0800 -Subject: [PATCH] cpuid_power.c: add CPU_SUBTYPE_POWERPC_7400 case - ---- - cpuid_power.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git cpuid_power.c cpuid_power.c -index 2526e8d0e..1ced8930a 100644 ---- cpuid_power.c -+++ cpuid_power.c -@@ -160,6 +160,7 @@ int detect(void){ - infoCount = HOST_BASIC_INFO_COUNT; - host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)&hostInfo, &infoCount); - -+ if (hostInfo.cpu_subtype == CPU_SUBTYPE_POWERPC_7400) return CPUTYPE_PPCG4; - if (hostInfo.cpu_subtype == CPU_SUBTYPE_POWERPC_7450) return CPUTYPE_PPCG4; - if (hostInfo.cpu_subtype == CPU_SUBTYPE_POWERPC_970) return CPUTYPE_PPC970; - diff --git a/math/OpenBLAS/files/patch-enable-overstep-of-too-long-args-without-DYNAMIC_ARCH.diff b/math/OpenBLAS/files/patch-enable-overstep-of-too-long-args-without-DYNAMIC_ARCH.diff deleted file mode 100644 index 1d3d7129a59d7..0000000000000 --- a/math/OpenBLAS/files/patch-enable-overstep-of-too-long-args-without-DYNAMIC_ARCH.diff +++ /dev/null @@ -1,32 +0,0 @@ -https://github.com/OpenMathLib/OpenBLAS/pull/4344 - -diff --git CMakeLists.txt CMakeLists.txt -index 69077322a..96edaf503 100644 ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -249,20 +249,20 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "AIX|Android|Linux|FreeBSD|OpenBSD|NetBSD|Drago - endif() - endif() - --if (APPLE AND DYNAMIC_ARCH AND BUILD_SHARED_LIBS) -+if (APPLE AND BUILD_SHARED_LIBS AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 20) - set (CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1) - if (NOT NOFORTRAN) - set (CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1) - set (CMAKE_Fortran_CREATE_SHARED_LIBRARY -- "sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ar -ru libopenblas.a && exit 0' " -- "sh -c 'ar -ru libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' " -+ "sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' " -+ "sh -c '${CMAKE_AR} -ru libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' " - "sh -c 'echo \"\" | ${CMAKE_Fortran_COMPILER} -o dummy.o -c -x f95-cpp-input - '" - "sh -c '${CMAKE_Fortran_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,libopenblas.a -Wl,-noall_load dummy.o -o ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib'" - "sh -c 'ls -l ${CMAKE_BINARY_DIR}/lib'") - else () - set (CMAKE_C_CREATE_SHARED_LIBRARY -- "sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ar -ru libopenblas.a && exit 0' " -- "sh -c 'ar -ru libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' " -+ "sh -c 'cat ${CMAKE_BINARY_DIR}/CMakeFiles/openblas_shared.dir/objects*.rsp | xargs -n 1024 ${CMAKE_AR} -ru libopenblas.a && exit 0' " -+ "sh -c '${CMAKE_AR} -ru libopenblas.a ${CMAKE_BINARY_DIR}/driver/others/CMakeFiles/driver_others.dir/xerbla.c.o && exit 0' " - "sh -c '${CMAKE_C_COMPILER} -fpic -shared -Wl,-all_load -Wl,-force_load,libopenblas.a -Wl,-noall_load -o ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libopenblas.${OpenBLAS_MAJOR_VERSION}.${OpenBLAS_MINOR_VERSION}.dylib'") - endif () - endif() diff --git a/math/OpenBLAS/files/patch-libnoarch.devel.diff b/math/OpenBLAS/files/patch-libnoarch.devel.diff deleted file mode 100644 index 16770c7ef16fe..0000000000000 --- a/math/OpenBLAS/files/patch-libnoarch.devel.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- Makefile.system.orig 2023-04-02 04:18:01.000000000 +0800 -+++ Makefile.system 2023-04-03 13:48:21.000000000 +0800 -@@ -1653,11 +1653,11 @@ - - ifneq ($(DYNAMIC_ARCH), 1) - ifndef SMP --LIBNAME = $(LIBPREFIX)_$(LIBCORE)$(REVISION).$(LIBSUFFIX) --LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)$(REVISION)_p.$(LIBSUFFIX) -+LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX) -+LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX) - else --LIBNAME = $(LIBPREFIX)_$(LIBCORE)p$(REVISION).$(LIBSUFFIX) --LIBNAME_P = $(LIBPREFIX)_$(LIBCORE)p$(REVISION)_p.$(LIBSUFFIX) -+LIBNAME = $(LIBPREFIX)$(REVISION).$(LIBSUFFIX) -+LIBNAME_P = $(LIBPREFIX)$(REVISION)_p.$(LIBSUFFIX) - endif - else - ifndef SMP diff --git a/math/OpenBLAS/files/patch-openblas.pc-fixed-version-and-url.diff b/math/OpenBLAS/files/patch-openblas.pc-fixed-version-and-url.diff deleted file mode 100644 index 442bfb3ae4d2c..0000000000000 --- a/math/OpenBLAS/files/patch-openblas.pc-fixed-version-and-url.diff +++ /dev/null @@ -1,16 +0,0 @@ -https://github.com/OpenMathLib/OpenBLAS/pull/4341 - -diff --git cmake/openblas.pc.in cmake/openblas.pc.in -index 7e120af86..11e5606e5 100644 ---- cmake/openblas.pc.in -+++ cmake/openblas.pc.in -@@ -5,7 +5,7 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - openblas_config=USE_64BITINT=@INTERFACE64@ NO_CBLAS=@NO_CBLAS@ NO_LAPACK=@NO_LAPACK@ NO_LAPACKE=@NO_LAPACKE@ DYNAMIC_ARCH=@DYNAMIC_ARCH@ DYNAMIC_OLDER=@DYNAMIC_OLDER@ NO_AFFINITY=@NO_AFFINITY@ USE_OPENMP=@USE_OPENMP@ @CORE@ MAX_THREADS=@NUM_THREADS@ - Name: OpenBLAS - Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version --Version: @OPENBLAS_VERSION@ --URL: https://github.com/xianyi/OpenBLAS -+Version: @OpenBLAS_VERSION@ -+URL: https://github.com/OpenMathLib/OpenBLAS - Libs: @OpenMP_C_FLAGS@ -L${libdir} -lopenblas${libsuffix} - Cflags: -I${includedir} diff --git a/math/OpenBLAS/files/patch-system_check.cmake-fix-arch-detection-for-Darwin-Pow.diff b/math/OpenBLAS/files/patch-system_check.cmake-fix-arch-detection-for-Darwin-Pow.diff deleted file mode 100644 index c4404d103ce91..0000000000000 --- a/math/OpenBLAS/files/patch-system_check.cmake-fix-arch-detection-for-Darwin-Pow.diff +++ /dev/null @@ -1,31 +0,0 @@ -From c732f275a27cbd9044d8409c2dd13e1e32f675ca Mon Sep 17 00:00:00 2001 -From: barracuda156 -Date: Mon, 11 Dec 2023 21:05:31 +0800 -Subject: [PATCH] system_check.cmake: fix arch detection for Darwin PowerPC - ---- - cmake/system_check.cmake | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git cmake/system_check.cmake cmake/system_check.cmake -index c9671b379..e94497a04 100644 ---- cmake/system_check.cmake -+++ cmake/system_check.cmake -@@ -38,7 +38,7 @@ if(CMAKE_CL_64 OR MINGW64) - endif() - elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING)) - set(X86 1) --elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc.*|power.*|Power.*") -+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc.*|power.*|Power.*" OR (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc.*")) - set(POWER 1) - elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips64.*") - set(MIPS64 1) -@@ -109,7 +109,7 @@ else() - endif () - - if (NOT BINARY) -- if (X86_64 OR ARM64 OR POWER OR MIPS64 OR LOONGARCH64 OR RISCV64) -+ if (X86_64 OR ARM64 OR MIPS64 OR LOONGARCH64 OR RISCV64 OR (POWER AND NOT (CMAKE_OSX_ARCHITECTURES STREQUAL "ppc"))) - set(BINARY 64) - else () - set(BINARY 32) diff --git a/math/OpenBLAS/files/patch-xcode15-fix.diff b/math/OpenBLAS/files/patch-xcode15-fix.diff deleted file mode 100644 index 3c7d198d24c03..0000000000000 --- a/math/OpenBLAS/files/patch-xcode15-fix.diff +++ /dev/null @@ -1,14 +0,0 @@ -https://github.com/OpenMathLib/OpenBLAS/pull/4328 - -diff --git Makefile.system Makefile.system -index 1b84195e4..ff06e503c 100644 ---- Makefile.system -+++ 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 -