From dc5906f930b18d7f37257f255fbbe0ec558cc7ac Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 19 Sep 2022 18:45:46 +0200 Subject: [PATCH] openblas: try to workaround a compiler crash by building with -Os -O1 and -Os seem to work here, but the later is easier to set via the build type. --- mingw-w64-openblas/PKGBUILD | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mingw-w64-openblas/PKGBUILD b/mingw-w64-openblas/PKGBUILD index f379d3934a..671af6cfd3 100644 --- a/mingw-w64-openblas/PKGBUILD +++ b/mingw-w64-openblas/PKGBUILD @@ -66,11 +66,18 @@ prepare() { _build_openblas() { _idx_opt=$1 - declare -a _build_type + declare _build_type if check_option "debug" "n"; then - _build_type+=("Release") + _build_type="Release" else - _build_type+=("Debug") + _build_type="Debug" + fi + + # https://github.com/msys2/MINGW-packages/issues/13128 + # MinSizeRel sets -Os, which seems to work around the compiler crash + # at least with the provided reproducer + if [[ ${MINGW_PACKAGE_PREFIX} == *-aarch64 ]]; then + _build_type="MinSizeRel" fi declare _c_lapack_opt