Remove nosegneg 32-bit Xen PV support libraries (#1482027)

This commit is contained in:
Florian Weimer 2017-08-16 12:03:03 +02:00
parent ad9d2e17df
commit 6e6bd41f5e
2 changed files with 11 additions and 94 deletions

View File

@ -75,18 +75,6 @@
# disabled it anyway as a conservative measure. # disabled it anyway as a conservative measure.
%define lock_elision_arches s390 s390x %define lock_elision_arches s390 s390x
############################################################################## ##############################################################################
# We build a special package for Xen that includes TLS support with
# no negative segment offsets for use with Xen guests. This is
# purely an optimization for increased performance on those arches.
%define xenarches i686 athlon
%ifarch %{xenarches}
%define buildxen 1
%define xenpackage 0
%else
%define buildxen 0
%define xenpackage 0
%endif
##############################################################################
# We support only 64-bit POWER with the following runtimes: # We support only 64-bit POWER with the following runtimes:
# 64-bit BE: # 64-bit BE:
# - Power 620 / 970 ISA (default runtime, compatile with POWER4 and newer) # - Power 620 / 970 ISA (default runtime, compatile with POWER4 and newer)
@ -415,23 +403,6 @@ contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a library and the standard math library. Without these two libraries, a
Linux system will not function. Linux system will not function.
##############################################################################
# glibc "xen" sub-package
##############################################################################
%if %{xenpackage}
%package xen
Summary: The GNU libc libraries (optimized for running under Xen)
Group: System Environment/Libraries
Requires: glibc = %{version}-%{release}, glibc-utils = %{version}-%{release}
%description xen
The standard glibc package is optimized for native kernels and does not
perform as well under the Xen hypervisor. This package provides alternative
library binaries that will be selected instead when running under Xen.
Install glibc-xen if you might run your system under the Xen hypervisor.
%endif
###################################################################### ######################################################################
# crypt subpackages # crypt subpackages
###################################################################### ######################################################################
@ -1030,14 +1001,6 @@ build()
############################################################################## ##############################################################################
build build
##############################################################################
# Build glibc for xen:
# If we support xen build glibc again for xen support.
##############################################################################
%if %{buildxen}
build nosegneg -mno-tls-direct-seg-refs
%endif
############################################################################## ##############################################################################
# Build glibc for power6: # Build glibc for power6:
# If we support building a power6 alternate runtime then built glibc again for # If we support building a power6 alternate runtime then built glibc again for
@ -1204,19 +1167,6 @@ unset libcrypt libcrypt_found
# This symbolic link will be generated by ldconfig. # This symbolic link will be generated by ldconfig.
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libcrypt.so.1 rm -f ${RPM_BUILD_ROOT}/%{_lib}/libcrypt.so.1
##############################################################################
# Install the xen build files.
##############################################################################
%if %{buildxen}
%define nosegneg_subdir_base i686
%define nosegneg_subdir i686/nosegneg
%define nosegneg_subdir_up ../..
pushd build-%{target}-nosegneg
destdir=$RPM_BUILD_ROOT/%{_lib}
install_different "$destdir" "%{nosegneg_subdir}" "%{nosegneg_subdir_up}"
popd
%endif # %{buildxen}
############################################################################## ##############################################################################
# Install the power6 build files. # Install the power6 build files.
############################################################################## ##############################################################################
@ -1419,8 +1369,6 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/*_p.a
# - Contains the list of files for the headers subpackage. # - Contains the list of files for the headers subpackage.
# * static.filelist # * static.filelist
# - Contains the list of files for the static subpackage. # - Contains the list of files for the static subpackage.
# * nosegneg.filelist
# - Contains the list of files for the xen subpackage.
# * libcrypt.filelist, libcrypt-nss.filelist # * libcrypt.filelist, libcrypt-nss.filelist
# - Contains the list of files for the crypt-related subpackages # - Contains the list of files for the crypt-related subpackages
# * nss_db.filelist, nss_nis.filelist, nss_hesiod.filelist # * nss_db.filelist, nss_nis.filelist, nss_hesiod.filelist
@ -1554,18 +1502,6 @@ sed -i -e '\|%{_prefix}/bin|d' \
-e '\|%{_prefix}/sbin/[^gi]|d' \ -e '\|%{_prefix}/sbin/[^gi]|d' \
-e '\|%{_prefix}/share|d' rpm.filelist -e '\|%{_prefix}/share|d' rpm.filelist
##############################################################################
# Build the xen package file list (nosegneg.filelist)
##############################################################################
truncate -s 0 nosegneg.filelist
%if %{xenpackage}
grep '/%{_lib}/%{nosegneg_subdir}' < rpm.filelist >> nosegneg.filelist
sed -i -e '\|/%{_lib}/%{nosegneg_subdir}|d' rpm.filelist
# TODO: There are files in the nosegneg list which should be in the devel
# pacakge, but we leave them instead in the xen subpackage. We may
# wish to clean that up at some point.
%endif
# Add the binary to build locales to the common subpackage. # Add the binary to build locales to the common subpackage.
echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist
@ -1749,10 +1685,9 @@ find_debuginfo_args="$find_debuginfo_args \
%endif %endif
-l rpm.filelist \ -l rpm.filelist \
%if %{with benchtests} %if %{with benchtests}
-l nosegneg.filelist -l benchtests.filelist" -l benchtests.filelist
%else
-l nosegneg.filelist"
%endif %endif
"
%endif %endif
eval /usr/lib/rpm/find-debuginfo.sh \ eval /usr/lib/rpm/find-debuginfo.sh \
"$find_debuginfo_args" \ "$find_debuginfo_args" \
@ -1953,16 +1888,6 @@ pushd build-%{target}
run_tests run_tests
popd popd
%if %{buildxen}
echo ====================TESTING -mno-tls-direct-seg-refs=============
##############################################################################
# - Test the xen runtimes (nosegneg).
##############################################################################
pushd build-%{target}-nosegneg
run_tests
popd
%endif
%if %{buildpower6} %if %{buildpower6}
echo ====================TESTING -mcpu=power6============= echo ====================TESTING -mcpu=power6=============
############################################################################## ##############################################################################
@ -2102,11 +2027,6 @@ if test $1 = 0; then
fi fi
%systemd_postun_with_restart nscd.service %systemd_postun_with_restart nscd.service
%if %{xenpackage}
%post xen -p /sbin/ldconfig
%postun xen -p /sbin/ldconfig
%endif
%clean %clean
rm -rf "$RPM_BUILD_ROOT" rm -rf "$RPM_BUILD_ROOT"
rm -f *.filelist* rm -f *.filelist*
@ -2114,10 +2034,6 @@ rm -f *.filelist*
%files -f rpm.filelist %files -f rpm.filelist
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_prefix}/%{_lib}/audit %dir %{_prefix}/%{_lib}/audit
%if %{buildxen} && !%{xenpackage}
%dir /%{_lib}/%{nosegneg_subdir_base}
%dir /%{_lib}/%{nosegneg_subdir}
%endif
%if %{buildpower6} %if %{buildpower6}
%dir /%{_lib}/power6 %dir /%{_lib}/power6
%dir /%{_lib}/power6x %dir /%{_lib}/power6x
@ -2149,13 +2065,6 @@ rm -f *.filelist*
%{!?_licensedir:%global license %%doc} %{!?_licensedir:%global license %%doc}
%license COPYING COPYING.LIB LICENSES %license COPYING COPYING.LIB LICENSES
%if %{xenpackage}
%files -f nosegneg.filelist xen
%defattr(-,root,root)
%dir /%{_lib}/%{nosegneg_subdir_base}
%dir /%{_lib}/%{nosegneg_subdir}
%endif
%ifnarch %{auxarches} %ifnarch %{auxarches}
%files -f common.filelist common %files -f common.filelist common
%defattr(-,root,root) %defattr(-,root,root)

View File

@ -74,7 +74,15 @@ main (void)
off_t base; off_t base;
ssize_t ret; ssize_t ret;
#ifdef __i386__ #ifdef __i386__
const char *remove_dirs[] = { "/lib/tls", "/lib/i686", "/lib/tls/i486", "/lib/tls/i586", "/lib/tls/i686" }; const char *remove_dirs[] =
{
"/lib/tls",
"/lib/i686",
"/lib/tls/i486",
"/lib/tls/i586",
"/lib/tls/i686",
"/lib/i686/nosegneg",
};
#else #else
#ifndef LIBTLS #ifndef LIBTLS
#define LIBTLS "/lib/tls" #define LIBTLS "/lib/tls"