Skip to content

Commit 54149c4

Browse files
committed
fix windows build
1 parent 32e5176 commit 54149c4

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tools/build_openblas.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,21 @@ fflags="$fextra $cflags -frecursive -ffpe-summary=invalid,zero"
7777
# Set suffixed-ILP64 flags
7878
if [ "$if_bits" == "64" ]; then
7979
SYMBOLSUFFIX="64_"
80-
interface_flags="INTERFACE64=1 SYMBOLSUFFIX=${SYMBOLSUFFIX} LIBNAMESUFFIX=${SYMBOLSUFFIX}"
80+
interface_flags="INTERFACE64=1 SYMBOLSUFFIX=${SYMBOLSUFFIX}"
8181
# We override FCOMMON_OPT, so we need to set default integer manually
8282
fflags="$fflags -fdefault-integer-8"
8383
else
8484
interface_flags=""
8585
fi
86-
interface_flags="$interface_flags SYMBOLPREFIX=scipy_ LIBNAMEPREFIX=scipy_ FIXED_LIBNAME=1"
86+
# On windows, the LIBNAMEPREFIX is not needed, SYMBOLPREFIX is added to the lib
87+
# name LIBPREFIX in Makefile.system.
88+
interface_flags="$interface_flags SYMBOLPREFIX=scipy_ FIXED_LIBNAME=1"
8789

8890
# Build name for output library from gcc version and OpenBLAS commit.
8991
GCC_TAG="gcc_$(gcc -dumpversion | tr .- _)"
9092
OPENBLAS_VERSION=$(git describe --tags --abbrev=8)
9193
# Build OpenBLAS
9294
# Variable used in creating output libraries
93-
export LIBNAMESUFFIX=${OPENBLAS_VERSION}-${GCC_TAG}
9495
make BINARY=$build_bits DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 \
9596
NUM_THREADS=24 NO_WARMUP=1 NO_AFFINITY=1 CONSISTENT_FPCSR=1 \
9697
BUILD_LAPACK_DEPRECATED=1 TARGET=PRESCOTT BUFFERSIZE=20\
@@ -100,7 +101,7 @@ make BINARY=$build_bits DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 \
100101
MAX_STACK_ALLOC=2048 \
101102
$interface_flags
102103
make PREFIX=$openblas_root/$build_bits $interface_flags install
103-
DLL_BASENAME=libscipy_openblas${SYMBOLSUFFIX}_${LIBNAMESUFFIX}
104+
DLL_BASENAME=libscipy_openblas${SYMBOLSUFFIX}${LIBNAMESUFFIX}
104105

105106
# OpenBLAS does not build a symbol-suffixed static library on Windows:
106107
# do it ourselves. On 32-bit builds, the objcopy.def names need a '_' prefix

0 commit comments

Comments
 (0)