do not package sse2 variant, use --enable-fat instead (a bit dangerous, some low level routines will be skipped in make check)

This commit is contained in:
Frantisek Kluknavsky 2015-09-14 19:54:36 +02:00
parent af9a9c9663
commit 06d627dd33

107
gmp.spec
View File

@ -80,7 +80,7 @@ ln -s ../configure .
%ifarch %{ix86}
export CFLAGS=$(echo $RPM_OPT_FLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")" -march=i686"
%endif
./configure --build=%{_build} --host=%{_host} \
./configure --enable-fat --build=%{_build} --host=%{_host} \
--program-prefix=%{?_program_prefix} \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
@ -103,36 +103,36 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
export LD_LIBRARY_PATH=`pwd`/.libs
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
cd ..
%ifarch %{ix86}
mkdir build-sse2
cd build-sse2
ln -s ../configure .
export CFLAGS=$(echo $RPM_OPT_FLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")" -march=pentium4"
./configure --build=%{_build} --host=%{_host} \
--program-prefix=%{?_program_prefix} \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--enable-cxx
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
-e 's|-lstdc++ -lm|-lstdc++|' \
-i libtool
export LD_LIBRARY_PATH=`pwd`/.libs
make %{?_smp_mflags}
unset CFLAGS
cd ..
%endif
#%ifarch %{ix86}
#mkdir build-sse2
#cd build-sse2
#ln -s ../configure .
#export CFLAGS=$(echo $RPM_OPT_FLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")" -march=pentium4"
#./configure --build=%{_build} --host=%{_host} \
# --program-prefix=%{?_program_prefix} \
# --prefix=%{_prefix} \
# --exec-prefix=%{_exec_prefix} \
# --bindir=%{_bindir} \
# --sbindir=%{_sbindir} \
# --sysconfdir=%{_sysconfdir} \
# --datadir=%{_datadir} \
# --includedir=%{_includedir} \
# --libdir=%{_libdir} \
# --libexecdir=%{_libexecdir} \
# --localstatedir=%{_localstatedir} \
# --sharedstatedir=%{_sharedstatedir} \
# --mandir=%{_mandir} \
# --infodir=%{_infodir} \
# --enable-cxx
#sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
# -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
# -e 's|-lstdc++ -lm|-lstdc++|' \
# -i libtool
#export LD_LIBRARY_PATH=`pwd`/.libs
#make %{?_smp_mflags}
#unset CFLAGS
#cd ..
#%endif
%install
cd base
@ -144,18 +144,18 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
cd ..
%ifarch %{ix86}
cd build-sse2
export LD_LIBRARY_PATH=`pwd`/.libs
mkdir $RPM_BUILD_ROOT%{_libdir}/sse2
install -m 755 .libs/libgmp.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
cp -a .libs/libgmp.so.[^.]* $RPM_BUILD_ROOT%{_libdir}/sse2
chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmp.so.[^.]*
install -m 755 .libs/libgmpxx.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
cp -a .libs/libgmpxx.so.? $RPM_BUILD_ROOT%{_libdir}/sse2
chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmpxx.so.?
cd ..
%endif
#%ifarch %{ix86}
#cd build-sse2
#export LD_LIBRARY_PATH=`pwd`/.libs
#mkdir $RPM_BUILD_ROOT%{_libdir}/sse2
#install -m 755 .libs/libgmp.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
#cp -a .libs/libgmp.so.[^.]* $RPM_BUILD_ROOT%{_libdir}/sse2
#chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmp.so.[^.]*
#install -m 755 .libs/libgmpxx.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
#cp -a .libs/libgmpxx.so.? $RPM_BUILD_ROOT%{_libdir}/sse2
#chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmpxx.so.?
#cd ..
#%endif
# Rename gmp.h to gmp-<arch>.h and gmp-mparam.h to gmp-mparam-<arch>.h to
# avoid file conflicts on multilib systems and install wrapper include files
@ -188,12 +188,12 @@ export LD_LIBRARY_PATH=`pwd`/.libs
make %{?_smp_mflags} check
cd ..
%endif
%ifarch %{ix86}
cd build-sse2
export LD_LIBRARY_PATH=`pwd`/.libs
make %{?_smp_mflags} check
cd ..
%endif
#%ifarch %{ix86}
#cd build-sse2
#export LD_LIBRARY_PATH=`pwd`/.libs
#make %{?_smp_mflags} check
#cd ..
#%endif
%post -p /sbin/ldconfig
@ -220,9 +220,9 @@ exit 0
%doc NEWS README
%{_libdir}/libgmp.so.*
%{_libdir}/libgmpxx.so.*
%ifarch %{ix86}
%{_libdir}/sse2/*
%endif
#%ifarch %{ix86}
#%{_libdir}/sse2/*
#%endif
%files devel
%defattr(-,root,root,-)
@ -237,6 +237,9 @@ exit 0
%{_libdir}/libgmpxx.a
%changelog
* Mon Sep 14 2015 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:6.0.0-13
- do not package sse2 variant, use --enable-fat instead (a bit dangerous, some low level routines will be skipped in `make check`)
* Fri Sep 04 2015 Michal Toman <mtoman@fedoraproject.org> - 1:6.0.0-12
- Add support for MIPS architecture to gmp.h and gmp-mparam.h