]> git.pld-linux.org Git - packages/glibc.git/blobdiff - glibc.spec
- disable profile subpackage if built with nptl
[packages/glibc.git] / glibc.spec
index 045f6b00804c26b536055a032dec4fa144bd8f48..5612bfda70943ac2f931aa16b16204d412ec861d 100644 (file)
@@ -1,6 +1,6 @@
 #
 # You can define min_kernel macro by "rpm --define 'min_kernel version'"
-# default is 2.2.0 (no changes up to 2.3.25)
+# default is 2.4.6
 #
 # Conditional build:
 %bcond_without fp              # build without frame pointer (pass \--enable-omitfp)
@@ -9,7 +9,10 @@
                                # glibc-kernel-headers (evil, breakage etc., don't use)
 %bcond_without dist_kernel     # for above, allow non-distribution kernel
 %bcond_with    idn             # build with included libidn
+%bcond_with    nptl            # use nptl instead of linuxthreads
+%bcond_without  tls            # do not use tls
 %bcond_without  tests          # do not perform "make test"
+
 #
 # TODO:
 # - localedb-gen man pages(?)
 #      posix zoneinfo dir removed, /etc/rc.d/init.d/timezone must be changed
 #      in order to use this version!
 #
-%{!?min_kernel:%global         min_kernel      2.4.6}
+
+%{!?min_kernel:%global          min_kernel      2.4.6}
+
+%if %{with nptl}
+%ifarch i686 athlon amd64 ia64 s390 s390x sparcv9 ppc ppc64
+%if "%{min_kernel}" < "2.6.0"
+%global                min_kernel      2.6.0
+%endif
+%else
+%undefine with_nptl
+%endif
+%endif
+
+%if %{with tls}
+%ifnarch i686 athlon amd64 ia64 s390 s390x alpha alphaev6 sparc sparcv9 ppc ppc64
+%undefine with_tls
+%endif
+%endif
+
 %define        gkh_version     7:2.6.0.3
 Summary:       GNU libc
 Summary(de):   GNU libc
@@ -32,7 +53,7 @@ Summary(tr):  GNU libc
 Summary(uk):   GNU libc ×ÅÒÓ¦§ 2.3
 Name:          glibc
 Version:       2.3.3
-Release:       0.1
+Release:       0.20040101.3%{?with_nptl:+nptl}
 Epoch:         6
 License:       LGPL
 Group:         Libraries
@@ -53,7 +74,6 @@ Source6:      http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-ma
 # borrowed from util-linux
 Source7:       sln.8
 Source8:       %{name}-localedb-gen
-# Source10-md5:        ded0b439efe16dd29ce5a24d3d3dcebf
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-initgroups-overflow.patch
 Patch2:                %{name}-pld.patch
@@ -73,8 +93,10 @@ Patch23:     %{name}-kernel_includes.patch
 Patch24:       %{name}-includes.patch
 Patch26:       %{name}-alpha-fix-as-syntax.patch
 Patch27:       %{name}-soinit-EH_FRAME.patch
+Patch28:       %{name}-fix-asserts.patch
 Patch30:       %{name}-sparc-errno_fix.patch
 Patch31:       %{name}-make.patch
+Patch32:       %{name}-tests-io-tmp.patch
 URL:           http://www.gnu.org/software/libc/
 BuildRequires: automake
 BuildRequires: binutils >= 2.13.90.0.2
@@ -679,13 +701,13 @@ Requires: %{name} = %{epoch}:%{version}-%{release}
 %endif
 
 %description -n %{name}64
-64-bit GNU libc libraries for sparc64 architecture.
+64-bit GNU libc libraries for 64bit architecture.
 
 %description -n %{name}64 -l es
-Bibliotecas GNU libc de 64 bits para la arquitectura sparc64.
+Bibliotecas GNU libc de 64 bits para la arquitectura 64bit.
 
 %description -n %{name}64 -l pl
-Biblioteki 64-bitowe GNU libc dla architektury sparc64.
+Biblioteki 64-bitowe GNU libc dla architektury 64bit.
 
 %package -n %{name}64-devel
 Summary:       Development files for 64-bit GNU libc libraries
@@ -695,16 +717,16 @@ Group:            Development/Libraries
 Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
 
 %description -n %{name}64-devel
-Development files for 64-bit GNU libc libraries for sparc64
+Development files for 64-bit GNU libc libraries for 64bit
 architecture.
 
 %description -n %{name}64-devel -l es
 Ficheros de desarrollo para las bibliotecas GNU libc de 64 bits para la
-arquitectura sparc64.
+arquitectura 64bit.
 
 %description -n %{name}64-devel -l pl
 Pliki do programowania z u¿yciem 64-bitowych bibliotek GNU libc dla
-architektury sparc64.
+architektury 64bit.
 
 %package -n %{name}64-static
 Summary:       Static 64-bit GNU libc libraries
@@ -740,11 +762,13 @@ Statyczne 64-bitowe biblioteki GNU libc.
 # don't know, if it is good idea, for brave ones
 #%patch19 -p1
 %{?with_kernelheaders:%patch23}
-%{?without_kernelheaders:%patch24 -p1}
+%{?!with_kernelheaders:%patch24 -p1}
 %patch26 -p1
 %patch27 -p1
+%patch28 -p1
 %patch30
 %patch31 -p1
+%patch32 -p1
 
 chmod +x scripts/cpp
 
@@ -757,23 +781,43 @@ cd builddir
 # avoid stripping ld.so by -s in rpmldflags
 LDFLAGS=" " ; export LDFLAGS
 ../%configure \
-       --enable-add-ons=linuxthreads \
        --enable-kernel="%{min_kernel}" \
-       --enable-profile \
        --%{!?with_fp:en}%{?with_fp:dis}able-omitfp \
+%if %{with nptl}
+        --enable-add-ons=nptl \
+       --with-tls \
+       --disable-profile \
+%else
+       %{?with_tls:--with-tls} \
+        --enable-add-ons=linuxthreads \
+       --enable-profile \
+%endif
 %if %{with kernelheaders}
        CPPFLAGS="-I%{_kernelsrcdir}/include" \
-       --with-headers=%{_kernelsrcdir}/include
+       --with-headers=%{_kernelsrcdir}/include 
 %else
        CPPFLAGS="-I%{_includedir}" \
-       --with-headers=%{_includedir}
+       --with-headers=%{_includedir} 
 %endif
 
 # problem compiling with --enable-bounded (must be reported to libc-alpha)
 
 %{__make} %{?parallelmkflags}
 
-%{?with_tests:%{__make} test}
+%if %{with tests}
+env LANGUAGE=C LC_ALL=C \
+%{__make} tests 2>&1 | awk '
+BEGIN { file = "" }
+{
+       if (($0 ~ /\*\*\* \[.*\.out\] Error/) && (file == "")) {
+               file=$0;
+               gsub(/.*\[/, NIL, file);
+               gsub(/\].*/, NIL, file);
+       }
+       print $0;
+}
+END { if (file != "") { print "ERROR OUTPUT FROM " file; system("cat " file); exit(1); } }'
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -810,8 +854,10 @@ ln -s /%{_lib}/ldconfig                    $RPM_BUILD_ROOT/sbin
 mv -f $RPM_BUILD_ROOT/%{_lib}/libpcprofile.so  $RPM_BUILD_ROOT%{_libdir}
 %endif
 
+%if %{without nptl}
 %{__make} -C ../linuxthreads/man
 install ../linuxthreads/man/*.3thr                     $RPM_BUILD_ROOT%{_mandir}/man3
+%endif
 
 rm -rf $RPM_BUILD_ROOT%{_datadir}/zoneinfo/{localtime,posixtime,posixrules,posix/*}
 
@@ -851,9 +897,11 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/hu/man7/man.7
 rm -rf ../documentation
 install -d ../documentation
 
+%if %{without nptl}
 cp -f ../linuxthreads/ChangeLog ../documentation/ChangeLog.threads
 cp -f ../linuxthreads/Changes ../documentation/Changes.threads
 cp -f ../linuxthreads/README ../documentation/README.threads
+%endif
 cp -f ../crypt/README.ufc-crypt ../documentation/
 
 cp -f ../ChangeLog* ../documentation
@@ -1205,9 +1253,11 @@ fi
 %{_libdir}/librt.a
 %{_libdir}/libutil.a
 
+%if %{without nptl}
 %files profile
 %defattr(644,root,root,755)
 %{_libdir}/lib*_p.a
+%endif
 
 %files pic
 %defattr(644,root,root,755)
This page took 0.03529 seconds and 4 git commands to generate.