ARMv7 still doesn't have runtime cpu detection.
This commit is contained in:
parent
4d572b6aca
commit
f3b68ef59a
@ -371,7 +371,8 @@ export AVX="NO_AVX2=1"
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
%ifarch armv7hl
|
%ifarch armv7hl
|
||||||
TARGET="TARGET=ARMV7 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
|
# ARM v7 still doesn't have runtime cpu detection...
|
||||||
|
TARGET="TARGET=ARMV7 DYNAMIC_ARCH=0"
|
||||||
%endif
|
%endif
|
||||||
%ifarch ppc64
|
%ifarch ppc64
|
||||||
TARGET="TARGET=POWER6 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
|
TARGET="TARGET=POWER6 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
|
||||||
@ -446,10 +447,20 @@ cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name}
|
|||||||
# Fix i686-x86_64 multilib difference
|
# Fix i686-x86_64 multilib difference
|
||||||
%multilib_fix_c_header --file %{_includedir}/openblas/openblas_config.h
|
%multilib_fix_c_header --file %{_includedir}/openblas/openblas_config.h
|
||||||
|
|
||||||
# Fix name of libraries
|
# Fix name of libraries: runtime CPU detection has none
|
||||||
slibname=`basename %{buildroot}%{_libdir}/libopenblas-*.so .so`
|
suffix=""
|
||||||
|
# but archs that don't have it do have one
|
||||||
|
%ifarch armv7hl
|
||||||
|
suffix="_armv7"
|
||||||
|
%endif
|
||||||
|
slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
|
||||||
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
|
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
|
||||||
sname=${slibname}
|
if [[ "$suffix" != "" ]]; then
|
||||||
|
sname=$(echo $slibname | sed "s|$suffix||g")
|
||||||
|
mv %{buildroot}%{_libdir}/${slibname}.so %{buildroot}%{_libdir}/${sname}.so
|
||||||
|
else
|
||||||
|
sname=${slibname}
|
||||||
|
fi
|
||||||
|
|
||||||
# Install the Rblas library
|
# Install the Rblas library
|
||||||
mkdir -p %{buildroot}%{_libdir}/R/lib/
|
mkdir -p %{buildroot}%{_libdir}/R/lib/
|
||||||
@ -482,8 +493,13 @@ install -D -p -m 644 serial64/${slibname64}.a %{buildroot}%{_libdir}/lib%{name}6
|
|||||||
slibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64_|g"`
|
slibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64_|g"`
|
||||||
install -D -p -m 644 serial64_/${slibname64_}.a %{buildroot}%{_libdir}/lib%{name}64_.a
|
install -D -p -m 644 serial64_/${slibname64_}.a %{buildroot}%{_libdir}/lib%{name}64_.a
|
||||||
|
|
||||||
sname64=${slibname64}
|
if [[ "$suffix" != "" ]]; then
|
||||||
sname64_=${slibname64_}
|
sname64=$(echo ${slibname64} | sed "s|$suffix||g")
|
||||||
|
sname64_=$(echo ${slibname64_} | sed "s|$suffix||g")
|
||||||
|
else
|
||||||
|
sname64=${slibname64}
|
||||||
|
sname64_=${slibname64_}
|
||||||
|
fi
|
||||||
install -D -p -m 755 serial64/${slibname64}.so %{buildroot}%{_libdir}/${sname64}.so
|
install -D -p -m 755 serial64/${slibname64}.so %{buildroot}%{_libdir}/${sname64}.so
|
||||||
install -D -p -m 755 serial64_/${slibname64_}.so %{buildroot}%{_libdir}/${sname64_}.so
|
install -D -p -m 755 serial64_/${slibname64_}.so %{buildroot}%{_libdir}/${sname64_}.so
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user