diff --git a/gmp.spec b/gmp.spec index 55f08394fb48c8c19141e9815d87639a1b4b6871..5779c6422fd1ac6591401f7e70b4df86ec1846a5 100644 --- a/gmp.spec +++ b/gmp.spec @@ -1,4 +1,5 @@ %global ENABLE_RLOC 1 +%define _find_debuginfo_opts -strip_a Name: gmp Version: 6.3.0 @@ -59,28 +60,21 @@ fi export CXXFLAGS=$(echo %{optflags} | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*/-march=i686/g") %endif +CONFIGURE_OPTS=( + --enable-cxx %if %{?ENABLE_RLOC} -mkdir rloc && \ - (cd rloc && ln -s ../configure || exit 1 -%configure --enable-cxx LDFLAGS=-Wl,--emit-relocs -sed -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ - -e 's|-lstdc++ -lm|-lstdc++|' \ - -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ - -i libtool -export LD_LIBRARY_PATH=`pwd`/.libs -%make_build -objreloc $(readlink -f .libs/libgmp.so) -) +LDFLAGS=-Wl,--emit-relocs %endif +) -%configure --enable-cxx - +%configure "${CONFIGURE_OPTS[@]}" sed -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ -e 's|-lstdc++ -lm|-lstdc++|' \ -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ -i libtool export LD_LIBRARY_PATH=`pwd`/.libs %make_build +objreloc $(readlink -f .libs/libgmp.so) %install export LD_LIBRARY_PATH=`pwd`/.libs @@ -93,7 +87,8 @@ ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so %if %{?ENABLE_RLOC} mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir} -install -pD $RPM_BUILD_DIR/%{name}-%{version}/rloc/.libs/*.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir} +objreloc $(readlink -f $RPM_BUILD_ROOT%{_libdir}/libgmp.so) +mv $RPM_BUILD_ROOT%{_libdir}/*.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir} %endif basearch=%{_arch} @@ -131,6 +126,9 @@ export LD_LIBRARY_PATH=`pwd`/.libs %endif %changelog +* Wed Sep 13 2023 taoyuxiang 1:6.3.0-3 +- use _find_debuginfo_opts -strip_a to reduce build time + * Tue Sep 12 2023 taoyuxiang 1:6.3.0-3 - add sub rpm coreutils-relocation