From 23ac66738eaa545e2f149c9aa9c3ddaf12170949 Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Sun, 5 Aug 2018 12:07:06 +0100 Subject: [PATCH] Work around invalid register errors with 64-bit Windows Adding `-fno-asynchronous-unwind-tables` to the C compiler flags passed to OpenBLAS works around errors claiming an invalid register for `.seh_savexmm`. We've been running into this on the 64-bit Windows buildbots. See discussion in https://github.com/xianyi/OpenBLAS/issues/1708. --- deps/blas.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deps/blas.mk b/deps/blas.mk index 26e985be75869..c025d4ac26e39 100644 --- a/deps/blas.mk +++ b/deps/blas.mk @@ -62,6 +62,15 @@ OPENBLAS_FFLAGS += -mincoming-stack-boundary=2 endif endif +# Work around invalid register errors on 64-bit Windows +# See discussion in https://github.com/xianyi/OpenBLAS/issues/1708 +# TODO: Remove this once we use a version of OpenBLAS where this is set automatically +ifeq ($(OS),WINNT) +ifeq ($(ARCH),x86_64) +OPENBLAS_CFLAGS += -fno-asynchronous-unwind-tables +endif +endif + OPENBLAS_BUILD_OPTS += CFLAGS="$(CFLAGS) $(OPENBLAS_CFLAGS)" OPENBLAS_BUILD_OPTS += FFLAGS="$(FFLAGS) $(OPENBLAS_FFLAGS)" OPENBLAS_BUILD_OPTS += LDFLAGS="$(LDFLAGS) $(RPATH_ESCAPED_ORIGIN)"