Skip to content

Commit d2b9cac

Browse files
committed
refactor
1 parent 6484495 commit d2b9cac

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

tools/build_openblas.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ if [ "$build_bits" == 64 ]; then
6464
extra="-fno-asynchronous-unwind-tables"
6565
vc_arch="X64"
6666
plat_tag="win_amd64"
67+
dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX"
6768
else
6869
march=pentium4
6970
extra="-mfpmath=sse -msse2"
7071
fextra="-m32"
7172
vc_arch="i386"
7273
plat_tag="win32"
74+
dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL"
7375
fi
7476
cflags="-O2 -march=$march -mtune=generic $extra"
7577
fflags="$fextra $cflags -frecursive -ffpe-summary=invalid,zero"
@@ -95,7 +97,7 @@ OPENBLAS_VERSION=$(git describe --tags --abbrev=8)
9597
make BINARY=$build_bits DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 \
9698
NUM_THREADS=24 NO_WARMUP=1 NO_AFFINITY=1 CONSISTENT_FPCSR=1 \
9799
BUILD_LAPACK_DEPRECATED=1 TARGET=PRESCOTT BUFFERSIZE=20 \
98-
DYNAMIC_LIST="PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX" \
100+
DYNAMIC_LIST=$dynamic_list \
99101
LDFLAGS="$LDFLAGS" \
100102
COMMON_OPT="$cflags" \
101103
FCOMMON_OPT="$fflags" \

tools/build_steps.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,32 +120,35 @@ function do_build_lib {
120120
case $(get_os)-$plat in
121121
Linux-x86_64)
122122
local bitness=64
123-
local target_flags="TARGET=PRESCOTT DYNAMIC_LIST=\"PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX\""
123+
local target=PRESCOTT
124+
local dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX"
124125
;;
125126
Darwin-x86_64)
126127
local bitness=64
127-
local target_flags="TARGET=CORE2 DYNAMIC_LIST=\"CORE2 NEHALEM SANDYBRIDGE HASWELL SKYLAKEX\""
128+
local target_flags=CORE2
129+
local dynamic_list="CORE2 NEHALEM SANDYBRIDGE HASWELL SKYLAKEX"
128130
# Pick up the gfortran runtime libraries
129131
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
130132
;;
131133
*-i686)
132134
local bitness=32
133-
local target_flags="TARGET=PRESCOTT DYNAMIC_LIST=\"PRESCOTT NEHALEM SANDYBRIDGE HASWELL"
135+
local target_flags=PRESCOTT
136+
local dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL"
134137
;;
135138
Linux-aarch64)
136139
local bitness=64
137-
local target_flags="TARGET=ARMV8"
140+
local target=ARMV8
138141
;;
139142
Darwin-arm64)
140143
local bitness=64
141-
local target_flags="TARGET=VORTEX"
144+
local target=VORTEX
142145
;;
143146
*-s390x)
144147
local bitness=64
145148
;;
146149
*-ppc64le)
147150
local bitness=64
148-
local target_flags="TARGET=POWER8"
151+
local target=POWER8
149152
;;
150153
*) echo "Strange plat value $plat"; exit 1 ;;
151154
esac
@@ -172,7 +175,8 @@ function do_build_lib {
172175
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
173176
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
174177
USE_OPENMP=0 NUM_THREADS=64 \
175-
BINARY=$bitness $interface_flags $target_flags > /dev/null
178+
BINARY=$bitness $interface_flags TARGET=$target \
179+
DYNAMIC_LIST=$dynamic_list > /dev/null
176180
make PREFIX=$BUILD_PREFIX $interface_flags install
177181
popd
178182
stop_spinner

0 commit comments

Comments
 (0)