@@ -49,12 +49,12 @@ git submodule update --init --recursive
49
49
50
50
51
51
# 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
58
58
rm -rf $openblas_root /$build_bits
59
59
60
60
# Set architecture flags
@@ -76,7 +76,7 @@ fflags="$fextra $cflags -frecursive -ffpe-summary=invalid,zero"
76
76
77
77
# Set suffixed-ILP64 flags
78
78
if [ " $if_bits " == " 64" ]; then
79
- SYMBOLSUFFIX =" 64_"
79
+ LIBNAMESUFFIX =" 64_"
80
80
interface_flags=" INTERFACE64=1 SYMBOLSUFFIX=64_ LIBNAMESUFFIX=64_"
81
81
# We override FCOMMON_OPT, so we need to set default integer manually
82
82
fflags=" $fflags -fdefault-integer-8"
@@ -92,9 +92,9 @@ GCC_TAG="gcc_$(gcc -dumpversion | tr .- _)"
92
92
OPENBLAS_VERSION=$( git describe --tags --abbrev=8)
93
93
# Patch OpenBLAS to exclude stray GFortran symbol.
94
94
# 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
98
98
# Build OpenBLAS
99
99
# Variable used in creating output libraries
100
100
make 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
132
132
cp -f " ${static_libname} .renamed" " $openblas_root /$build_bits /lib/${static_libname} "
133
133
cp -f " ${static_libname} .renamed" " $openblas_root /$build_bits /lib/${DLL_BASENAME} .a"
134
134
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
+
135
155
cd $openblas_root
136
156
# Copy library link file for custom name
137
157
pushd $build_bits /lib
@@ -154,16 +174,8 @@ else
154
174
sed -e " s/^Cflags.*/\0 -DBLAS_SYMBOL_PREFIX=scipy_/" -i pkgconfig/scipy-openblas.pc
155
175
fi
156
176
popd
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
-
165
177
ls $openblas_root /$build_bits /lib
166
178
167
- zip_name=" openblas${SYMBOLSUFFIX } -${OPENBLAS_VERSION} -${plat_tag} -${GCC_TAG} .zip"
179
+ zip_name=" openblas${LIBNAMESUFFIX } -${OPENBLAS_VERSION} -${plat_tag} -${GCC_TAG} .zip"
168
180
zip -r $zip_name $build_bits
169
181
cp $zip_name ${builds_dir}
0 commit comments