@@ -28,13 +28,7 @@ BOOTSTRAP_DEBUG_LEVEL ?= 0
2828OPENBLAS_TARGET_ARCH: =
2929OPENBLAS_SYMBOLSUFFIX: =
3030OPENBLAS_LIBNAMESUFFIX: =
31-
32- # If OPENBLAS_TARGET_ARCH is set, we default to disabling OPENBLAS_DYNAMIC_ARCH
33- ifneq ($(OPENBLAS_TARGET_ARCH ) ,)
3431OPENBLAS_DYNAMIC_ARCH: =0
35- else
36- OPENBLAS_DYNAMIC_ARCH: =1
37- endif
3832OPENBLAS_USE_THREAD: =1
3933
4034# Flags for using libraries available on the system instead of building them.
@@ -995,9 +989,15 @@ MTUNE=native
995989endif
996990endif
997991
992+ # If we are running on x86 or x86_64, set certain options automatically
993+ ifeq (1,$(ISX86 ) )
994+ OPENBLAS_DYNAMIC_ARCH: =1
995+ endif
996+
998997# If we are running on powerpc64le or ppc64le, set certain options automatically
999998ifneq (,$(filter $(ARCH ) , powerpc64le ppc64le) )
1000999JCFLAGS += -fsigned-char
1000+ OPENBLAS_DYNAMIC_ARCH: =1
10011001OPENBLAS_TARGET_ARCH: =POWER8
10021002BINARY: =64
10031003# GCC doesn't do -march= on ppc64le
@@ -1054,17 +1054,23 @@ endif
10541054# If we are running on ARM, set certain options automatically
10551055ifneq (,$(findstring arm,$(ARCH ) ) )
10561056JCFLAGS += -fsigned-char
1057- OPENBLAS_DYNAMIC_ARCH: =0
10581057OPENBLAS_TARGET_ARCH: =ARMV7
10591058BINARY: =32
10601059endif
10611060
10621061# If we are running on aarch64 (e.g. ARMv8 or ARM64), set certain options automatically
10631062ifneq (,$(findstring aarch64,$(ARCH ) ) )
1063+ OPENBLAS_DYNAMIC_ARCH: =1
10641064OPENBLAS_TARGET_ARCH: =ARMV8
10651065BINARY: =64
10661066endif
10671067
1068+ # If we are running on riscv64, set certain options automatically
1069+ ifneq (,$(findstring riscv64,$(ARCH ) ) )
1070+ OPENBLAS_DYNAMIC_ARCH: =1
1071+ BINARY: =64
1072+ endif
1073+
10681074# Set MARCH-specific flags
10691075ifneq ($(MARCH ) ,)
10701076CC += -march=$(MARCH )
0 commit comments