Skip to content

Commit 3bf6d94

Browse files
committed
Fix snprintf symbol for 32-bit
1 parent 58049ae commit 3bf6d94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/build_openblas.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ if [ "$build_bits" == 64 ]; then
6262
extra="-fno-asynchronous-unwind-tables"
6363
vc_arch="X64"
6464
plat_tag="win_amd64"
65+
snprintf_suffix=''
6566
else
6667
march=pentium4
6768
extra="-mfpmath=sse -msse2"
6869
fextra="-m32"
6970
vc_arch="i386"
7071
plat_tag="win32"
72+
snprintf_suffix='__mingw_'
7173
fi
7274
cflags="-O2 -march=$march -mtune=generic $extra"
7375
fflags="$fextra $cflags -frecursive -ffpe-summary=invalid,zero"
@@ -86,7 +88,7 @@ fi
8688
GCC_TAG="gcc_$(gcc -dumpversion | tr .- _)"
8789
OPENBLAS_VERSION=$(git describe --tags)
8890
# Patch OpenBLAS to exclude stray GFortran symbol.
89-
patch -p1 < ../patches/openblas-make-libs.patch
91+
cat ../patches/openblas-make-libs.patch | sed "s/=snprintf/=${snprintf_suffix}snprintf/" | patch -p1
9092
# Build OpenBLAS
9193
# Variable used in creating output libraries
9294
export LIBNAMESUFFIX=${OPENBLAS_VERSION}-${GCC_TAG}

0 commit comments

Comments
 (0)