Skip to content

Commit 6029173

Browse files
authored
OpenBLAS: Fix cross-compilation detection for source build. (#56139)
We may be cross-compiling Linux-to-Linux, in which case `BUILD_OS` == `OS`, so look at `XC_HOST` to determine whether we're cross compiling.
1 parent 7f97a9d commit 6029173

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/openblas.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ OPENBLAS_FFLAGS := $(JFFLAGS) $(USE_BLAS_FFLAGS)
4343
OPENBLAS_CFLAGS := -O2
4444

4545
# Decide whether to build for 32-bit or 64-bit arch
46-
ifneq ($(BUILD_OS),$(OS))
46+
ifneq ($(XC_HOST),)
4747
OPENBLAS_BUILD_OPTS += OSNAME=$(OS) CROSS=1 HOSTCC=$(HOSTCC) CROSS_SUFFIX=$(CROSS_COMPILE)
4848
endif
4949
ifeq ($(OS),WINNT)

0 commit comments

Comments
 (0)