+%bcond_with pp # disable stack protector 'coz dietlibc will not work with it!
+
Summary: C library optimized for size
Summary(pl): Biblioteka standardowa C zoptymalizowana na rozmiar
Summary(pt_BR): libc pequena otimizada para tamanho
Name: dietlibc
-Version: 0.24
-Release: 4
+Version: 0.25
+Release: 1
Epoch: 2
License: GPL v2
Group: Development/Libraries
Source0: http://www.kernel.org/pub/linux/libs/dietlibc/%{name}-%{version}.tar.bz2
-# Source0-md5: 1dc54e022c2b31fa99a512225ed36150
+# Source0-md5: a24c99d65b7443d17d0b15b74a1b39a0
Source1: %{name}-divrem.m4
Patch0: %{name}-ppc.patch
Patch1: %{name}-opt.patch
Patch2: %{name}-athlon.patch
Patch3: %{name}-amd64.patch
+Patch4: %{name}-pentiumX.patch
URL: http://www.fefe.de/dietlibc/
%ifarch sparc
BuildRequires: m4
%define dietprefix %{_prefix}/%{_target_cpu}-linux-dietlibc
# for some reason known only to rpm there must be "\\|" not "\|" here
-%define libarch %(echo %{_target_cpu} | sed -e 's/i.86\\|athlon/i386/;s/amd64/x86_64/')
+%define libarch %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium3\\|pentium4\\|athlon/i386/;s/amd64/x86_64/')
%description
Small libc for building embedded applications.
Summary(pl): Pliki dla programistów u¿ywaj±cych dietlibc
Summary(pt_BR): libc pequena otimizada para tamanho
Group: Development/Libraries
-Requires: %{name} = %{epoch}:%{version}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description devel
Small libc for building embedded applications - development files.
Summary: Static libraries for dietlibc
Summary(pl): Biblioteki statyczne dla dietlibc
Group: Development/Libraries
-Requires: %{name}-devel = %{epoch}:%{version}
+Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description static
Small libc for building embedded applications - static libraries.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%ifarch sparc
# generate missing functions
%endif
%build
-OPTFLAGS="%{rpmcflags}"; export OPTFLAGS
+OPTFLAGS="%{rpmcflags} %{?with_pp:-fno-stack-protector}"; export OPTFLAGS
%ifarch sparc sparcv9
sparc32 \
%endif