@@ -49,12 +49,12 @@ git submodule update --init --recursive
4949
5050
5151# Get / clean code
52- git fetch origin
53- if [ -n " $OPENBLAS_COMMIT " ]; then
54- git checkout $OPENBLAS_COMMIT
55- fi
56- git clean -fxd
57- git reset --hard
52+ # git fetch origin
53+ # if [ -n "$OPENBLAS_COMMIT" ]; then
54+ # git checkout $OPENBLAS_COMMIT
55+ # fi
56+ # git clean -fxd
57+ # git reset --hard
5858rm -rf $openblas_root /$build_bits
5959
6060# Set architecture flags
@@ -76,7 +76,7 @@ fflags="$fextra $cflags -frecursive -ffpe-summary=invalid,zero"
7676
7777# Set suffixed-ILP64 flags
7878if [ " $if_bits " == " 64" ]; then
79- SYMBOLSUFFIX =" 64_"
79+ LIBNAMESUFFIX =" 64_"
8080 interface_flags=" INTERFACE64=1 SYMBOLSUFFIX=64_ LIBNAMESUFFIX=64_"
8181 # We override FCOMMON_OPT, so we need to set default integer manually
8282 fflags=" $fflags -fdefault-integer-8"
@@ -92,9 +92,9 @@ GCC_TAG="gcc_$(gcc -dumpversion | tr .- _)"
9292OPENBLAS_VERSION=$( git describe --tags --abbrev=8)
9393# Patch OpenBLAS to exclude stray GFortran symbol.
9494# Replacement snprintf symbol only present for UCRTC 64-bit build.
95- if [ " $BUILD_BITS " == 64 ]; then
96- patch -p1 < ../patches-windows/openblas-make-libs.patch
97- fi
95+ # if [ "$BUILD_BITS" == 64 ]; then
96+ # patch -p1 < ../patches-windows/openblas-make-libs.patch
97+ # fi
9898# Build OpenBLAS
9999# Variable used in creating output libraries
100100make BINARY=$build_bits DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 \
@@ -132,6 +132,26 @@ objcopy --redefine-syms exports/objcopy.def "${static_libname}" "${static_libnam
132132cp -f " ${static_libname} .renamed" " $openblas_root /$build_bits /lib/${static_libname} "
133133cp -f " ${static_libname} .renamed" " $openblas_root /$build_bits /lib/${DLL_BASENAME} .a"
134134
135+ # Make sure quadmath library is not statically linked in to the DLL by checking
136+ # the output.map generated by the linker when using `-Wl,-gc-sections -Wl,-s`
137+ # the map will have libname(o-filename) for each function pulled out of the
138+ # library
139+ # The file itself appears in the map
140+ grep -A 3 " libquadmath.a(" output.map
141+ case $? in
142+ 0)
143+ echo " link uses libquadmath.a when it should not"
144+ exit -1
145+ ;;
146+ 2)
147+ echo " could not find 'output.map' to verify linking avoids libquadmath.a"
148+ exit -1
149+ ;;
150+ 1)
151+ echo " verified no 'libquadmath' used when linking"
152+ ;;
153+ esac
154+
135155cd $openblas_root
136156# Copy library link file for custom name
137157pushd $build_bits /lib
@@ -154,16 +174,8 @@ else
154174 sed -e " s/^Cflags.*/\0 -DBLAS_SYMBOL_PREFIX=scipy_/" -i pkgconfig/scipy-openblas.pc
155175fi
156176popd
157- # Build template site.cfg for using this build
158- cat > ${build_bits} /site.cfg.template << EOF
159- [openblas${SYMBOLSUFFIX} ]
160- libraries = $DLL_BASENAME
161- library_dirs = {openblas_root}\\ ${build_bits} \\ lib
162- include_dirs = {openblas_root}\\ ${build_bits} \\ include
163- EOF
164-
165177ls $openblas_root /$build_bits /lib
166178
167- zip_name=" openblas${SYMBOLSUFFIX } -${OPENBLAS_VERSION} -${plat_tag} -${GCC_TAG} .zip"
179+ zip_name=" openblas${LIBNAMESUFFIX } -${OPENBLAS_VERSION} -${plat_tag} -${GCC_TAG} .zip"
168180zip -r $zip_name $build_bits
169181cp $zip_name ${builds_dir}
0 commit comments