Skip to content

Commit dde478c

Browse files
committed
Carry openblas power assembly fixes
from OpenMathLib/OpenBLAS#1098 (cherry picked from commit 26beab3) ref #21091
1 parent 32e26e1 commit dde478c

File tree

2 files changed

+7842
-1
lines changed

2 files changed

+7842
-1
lines changed

deps/blas.mk

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,16 @@ endif
7474
# Do not overwrite the "-j" flag
7575
OPENBLAS_BUILD_OPTS += MAKE_NB_JOBS=0
7676

77-
$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/config.status: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/Makefile
77+
# Power inline assembly fixes from https://github.com/xianyi/OpenBLAS/pull/1098
78+
# Remove this when we upgrade beyond OpenBLAS v0.2.19
79+
$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-power-assembly-fixes.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/Makefile
80+
cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && patch -p1 -f < $(SRCDIR)/patches/openblas-power-assembly-fixes.patch
81+
echo 1 > $@
82+
83+
$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/config.status: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-power-assembly-fixes.patch-applied
7884
perl -i -ple 's/^\s*(EXTRALIB\s*\+=\s*-lSystemStubs)\s*$$/# $$1/g' $<.system
7985
touch $@
86+
8087
$(OPENBLAS_OBJ_SOURCE): $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/config.status
8188
echo $(MAKE) -C $(dir $<) $(OPENBLAS_BUILD_OPTS) # echo first, so we only print the error message below in a failure case
8289
@$(MAKE) -C $(dir $<) $(OPENBLAS_BUILD_OPTS) || (echo $(WARNCOLOR)"*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0' if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***"$(ENDCOLOR) && false)

0 commit comments

Comments
 (0)