summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-04-27 07:16:23 +0000
committerRoland McGrath <roland@gnu.org>2005-04-27 07:16:23 +0000
commit536db0d3b5efac042be3bf1d6f99f9c418f76255 (patch)
tree664c6b30c136aa1ad785a7c94fee12a4369ad2a2
parent6183d906dd822337dec18dd1f48209dfd17127bd (diff)
Add nosegneg build in glibc-xen subpackage on i686.
-rw-r--r--fedora/glibc.spec.in95
1 files changed, 85 insertions, 10 deletions
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index e0b84fa4bc..faef2c9a64 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -1,9 +1,17 @@
-%define glibcrelease 1
+%define glibcrelease 2
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define prelinkarches noarch
%define nptlarches i386 i686 athlon x86_64 ia64 s390 s390x sparcv9 ppc ppc64
-%define rtkaioarches noarch
%define withtlsarches i386 i686 athlon x86_64 ia64 s390 s390x alpha alphaev6 sparc sparcv9 ppc ppc64
+%define xenarches i686 athlon
+%ifarch %{xenarches}
+%define buildxen 1
+%define xenpackage 1
+%else
+%define buildxen 0
+%define xenpackage 0
+%endif
+%define rtkaioarches noarch
%define debuginfocommonarches %{ix86} alpha alphaev6 sparc sparcv9
%define _unpackaged_files_terminate_build 0
Summary: The GNU libc libraries.
@@ -92,6 +100,20 @@ contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.
+%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
+
%package devel
Summary: Object files for development using standard C libraries.
Group: Development/Libraries
@@ -568,18 +590,30 @@ cd ..
%endif
%ifarch %{nptlarches}
-rm -rf build-%{nptl_target_cpu}-linuxnptl
-mkdir build-%{nptl_target_cpu}-linuxnptl ; cd build-%{nptl_target_cpu}-linuxnptl
+build_nptl()
+{
+builddir=build-%{nptl_target_cpu}-$1
+shift
+rm -rf $builddir
+mkdir $builddir ; cd $builddir
EnableKernel="--enable-kernel=%{enablekernelnptl} --disable-profile"
Pthreads=nptl
WithTls="--with-tls --with-__thread"
-CC="$GCC" CFLAGS="$BuildFlags -g -O3" ../configure --prefix=%{_prefix} \
+build_CFLAGS="$BuildFlags -g -O3 $*"
+CC="$GCC" CFLAGS="$build_CFLAGS" ../configure --prefix=%{_prefix} \
--enable-add-ons=$Pthreads$AddOns --without-cvs $EnableKernel \
--with-headers=%{_prefix}/include --enable-bind-now \
$WithTls --build %{nptl_target_cpu}-redhat-linux --host %{nptl_target_cpu}-redhat-linux
-make -j$numprocs -r CFLAGS="$BuildFlags -g -O3" PARALLELMFLAGS=-s
+make -j$numprocs -r CFLAGS="$build_CFLAGS" PARALLELMFLAGS=-s
cd ..
+}
+
+build_nptl linuxnptl
+
+%if %{buildxen}
+build_nptl linuxnptl-nosegneg -mno-tls-direct-seg-refs
+%endif
%endif
%install
@@ -642,12 +676,14 @@ cd ..
%endif
%ifarch %{nptlarches}
-cd build-%{nptl_target_cpu}-linuxnptl
+ObsDir=obsolete/linuxthreads
mkdir -p $RPM_BUILD_ROOT/%{_lib}/obsolete/linuxthreads
mv -f $RPM_BUILD_ROOT/%{_lib}/lib{c,m,pthread,rt,thread_db}[.-]*so* $RPM_BUILD_ROOT/%{_lib}/obsolete/linuxthreads/
+
+install_nptl() {
+cd build-%{nptl_target_cpu}-$1
Pthreads=nptl
-SubDir=
-ObsDir=obsolete/linuxthreads
+SubDir=$2
mkdir -p $RPM_BUILD_ROOT/%{_lib}/$SubDir/
cp -a libc.so $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/$ObsDir/libc-*.so`
ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/$ObsDir/libc-*.so` $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/$ObsDir/libc.so.*`
@@ -666,6 +702,9 @@ ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/$ObsDir/librt-*.so` $RPM_BUILD_ROOT/%{_
%endif
cp -a ${Pthreads}_db/libthread_db.so $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/$ObsDir/libthread_db-*.so`
ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/$ObsDir/libthread_db-*.so` $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/$ObsDir/libthread_db.so.*`
+}
+
+install_nptl linuxnptl
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{_lib}/linuxthreads
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/{libc,libpthread,libpthread_nonshared,librt}.a \
@@ -702,6 +741,12 @@ rm -rf $RPM_BUILD_ROOT/nptl
cd ..
+%if %{buildxen}
+%define nosegneg_subdir i686/nosegneg
+install_nptl linuxnptl-nosegneg %{nosegneg_subdir}
+cd ..
+%endif
+
%endif
# compatibility hack: this locale has vanished from glibc, but some other
@@ -871,6 +916,13 @@ grep -v '%{_prefix}/bin' < rpm.filelist.full |
grep -v '%{_prefix}/sbin/[^gi]' |
grep -v '%{_prefix}/share' > rpm.filelist
+> nosegneg.filelist
+%if %{xenpackage}
+grep '/%{_lib}/%{nosegneg_subdir}' < rpm.filelist >> nosegneg.filelist
+mv rpm.filelist rpm.filelist.full
+grep -v '/%{_lib}/%{nosegneg_subdir}' < rpm.filelist.full > rpm.filelist
+%endif
+
echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist
echo '%{_prefix}/sbin/nscd' > nscd.filelist
@@ -943,6 +995,12 @@ echo ====================TESTING NPTL====================
cd build-%{nptl_target_cpu}-linuxnptl
make -j$numprocs -k check PARALLELMFLAGS=-s 2>&1 | tee check.log || :
cd ..
+%if %{buildxen}
+echo ====================TESTING NPTL -mno-tls-direct-seg-refs=============
+cd build-%{nptl_target_cpu}-linuxnptl-nosegneg
+make -j$numprocs -k check PARALLELMFLAGS=-s 2>&1 | tee check.log || :
+cd ..
+%endif
%endif
echo ====================TESTING DETAILS=================
for i in `sed -n 's|^.*\*\*\* \[\([^]]*\.out\)\].*$|\1|p' build-*-linux*/check.log`; do
@@ -999,7 +1057,8 @@ echo -n > $csf
strip $RPM_BUILD_ROOT/{sbin/ldconfig,usr/sbin/glibc_post_upgrade.%{_target_cpu},usr/sbin/build-locale-archive}
# Strip ELF binaries
-for f in `grep -v '%%\(dir\|lang\|config\|verify\)' rpm.filelist`; do
+for f in `cat rpm.filelist nosegneg.filelist \
+ | grep -v '%%\(dir\|lang\|config\|verify\)'`; do
bf=$RPM_BUILD_ROOT$f
if [ -f $bf -a -x $bf -a ! -h $bf ]; then
if `file $bf 2>/dev/null | grep 'ELF.*, not stripped' | grep -vq 'statically linked'`; then
@@ -1160,6 +1219,11 @@ if [ "$1" -ge "1" ]; then
service nscd condrestart > /dev/null 2>&1 || :
fi
+%if %{xenpackage}
+%post xen -p /sbin/ldconfig
+%postun xen -p /sbin/ldconfig
+%endif
+
%clean
rm -rf "$RPM_BUILD_ROOT"
rm -f *.filelist*
@@ -1177,6 +1241,9 @@ rm -f *.filelist*
%dir /lib/i686
%endif
%endif
+%if %{buildxen} && !%{xenpackage}
+%dir /%{_lib}/%{nosegneg_subdir}
+%endif
%ifarch s390x
%dir /lib
/lib/ld64.so.1
@@ -1198,6 +1265,12 @@ rm -f *.filelist*
%doc COPYING COPYING.LIB README.libm LICENSES
%doc hesiod/README.hesiod
+%if %{xenpackage}
+%files -f nosegneg.filelist xen
+%defattr(-,root,root)
+%dir /%{_lib}/%{nosegneg_subdir}
+%endif
+
%ifnarch %{auxarches}
%files -f common.filelist common
%defattr(-,root,root)
@@ -1264,6 +1337,8 @@ rm -f *.filelist*
%endif
%changelog
+- glibc-xen subpackage for i686
+
* Fri Apr 15 2005 Roland McGrath <roland@redhat.com> 2.3.5-1
- update from CVS
- fix execvp regression (BZ#851)