%define target arm-gp2x-linux Name: %{target}-glibc Version: 2.3.6 Release: 9%{?dist} Summary: Cross Compiled GNU C Library targeted at %{target} Group: Development/Languages License: LGPLv2+ URL: http://www.gnu.org/software/libc/ Source0: ftp://ftp.gnu.org/gnu/glibc/glibc-%{version}.tar.bz2 Source1: ftp://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-%{version}.tar.bz2 Source2: README.fedora Patch1: http://kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/arm-ctl_bus_isa.patch Patch2: http://kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/glibc-2.3.5-allow-gcc-4.0-wordexp.patch Patch3: http://kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/glibc-2.3.5-allow-gcc4-wcstol_l.patch Patch4: http://kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/glibc-2.3.6-allow-gcc-4.0-arm.patch Patch5: http://kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/glibc-2.3.6-allow-gcc-4.0-elf.patch Patch6: http://kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/glibc-2.3.6-fix-pr631.patch Patch7: http://kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/glibc-fp-byteorder.patch Patch8: http://kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/make-install-lib-all.patch # from: http://open2x.svn.sourceforge.net/viewvc/open2x/trunk/toolchain-new/patches/glibc-linuxthreads-2.3.6/glibc-linuxthreads-2.3.6-raise.patch?revision=223 Patch9: glibc-linuxthreads-2.3.6-raise.patch Patch10: glibc-2.3.6-manual-makefile.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) BuildRequires: %{target}-gcc %{target}-kernel-headers BuildArch: noarch Requires: %{target}-kernel-headers %description This is a Cross Compiled version of the GNU C Library, which can be used to compile and link binaries for the %{target} platform, instead of for the native %{_arch} platform. %prep %setup -q -c pushd glibc-%{version} tar -xf %{SOURCE1} %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 popd cp -a %{SOURCE2} . %build mkdir -p build-%{target}-glibc pushd build-%{target}-glibc # CFLAGS not used, maybe we should ? ../glibc-%{version}/configure --prefix=%{_prefix}/%{target} \ --build=`uname -m` --host=%{target} --enable-add-ons=linuxthreads \ --without-fp --disable-profile --without-selinux make %{?_smp_mflags} # generate stubs.h for i in io math misc posix stdlib streams; do make -C ../glibc-%{version}/$i objdir=`pwd` stubs cat $i/stubs >> subdir-stubs.h done sed '/^@/d' < ../glibc-%{version}/include/stubs-prologue.h > stubs.h sort subdir-stubs.h >> stubs.h popd %install rm -rf $RPM_BUILD_ROOT pushd build-%{target}-glibc make install-lib-all install_root=$RPM_BUILD_ROOT # For some reason with newer makes there are both .dt and .d files in math # after the build, this confuses make install-headers so remove the .dt ones # which should not be there rm math/*.dt make install-headers install_root=$RPM_BUILD_ROOT install -m 644 bits/stdio_lim.h $RPM_BUILD_ROOT%{_prefix}/%{target}/include/bits install -m 644 stubs.h $RPM_BUILD_ROOT%{_prefix}/%{target}/include/gnu popd # despite us being noarch redhat-rpm-config insists on stripping our files # and on running find-debuginfo.sh on our files %define __debug_install_post %{nil} %define __os_install_post /usr/lib/rpm/redhat/brp-compress # stop rpm from claiming we provide and need native glibc symbols <sigh> %define _use_internal_dependency_generator 0 %define __find_requires %{nil} %define __find_provides %{nil} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc glibc-%{version}/BUGS glibc-%{version}/C* glibc-%{version}/FAQ %doc glibc-%{version}/LICENSES glibc-%{version}/README %doc glibc-%{version}/README.libm README.fedora %{_prefix}/%{target}/include/* %{_prefix}/%{target}/lib %changelog * Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.6-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Sep 8 2010 Hans de Goede <hdegoede@redhat.com> 2.3.6-8 - Fix building with latest make (#631444) * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Feb 13 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.6-5 - Fix error in %%setup call causing a build error with newer rpmbuild * Sun Aug 5 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.6-4 - Do NOT provide and require native glibc symbols <sigh> * Fri Aug 3 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.6-3 - Change License tag to: LGPLv2+ - Don't own %%{_prefix}/%%{target} and %%{_prefix}/%%{target}/include dirs, as these are already owned by the required arm-gp2x-linux-kernel-headers rpm * Thu May 31 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.3.6-2 - Merge in latest avr-libc changes (make noarch, don't strip files) * Thu Apr 25 2007 Koos Termeulen koostermeulen@gmail.com 2.3.6-1 - Initial release