Search
SailfishOS Open Build Service
>
Projects
>
home:LiuQian
>
eglibc
> Changes
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 3
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
[-]
[+]
Added
eglibc.spec
@@ -0,0 +1,656 @@ +%define multiarcharches %{ix86} x86_64 +%define run_glibc_tests 0 +%define localepackage 0 + +Summary:a variant of the GNU C Library targetting embedded systems. +Name: eglibc +Version:2.13 +Release:1 +# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. +# Things that are linked directly into dynamically linked programs +# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional +# exception which allows linking it into any kind of programs or shared +# libraries without restrictions. +License:LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ +Group: System/Libraries +URL: http://www.eglibc.org +Source0: eglibc-2.13.tar.bz2 +Source1: manual.tar +Source10: glibc_post_upgrade.c +Source11: build-locale-archive.c +Source12: tzdata-update.c +Source13: generate-supported.mk + +Patch1: slp-limit-hack.patch +Patch2: eglibc-2.13-debian.patch.gz +Patch3: glibc-arm-atomics-disable-qemu.patch +Patch4: use_fullpath.patch + +Provides: ldconfig +# The dynamic linker supports DT_GNU_HASH +Provides: rtld(GNU_HASH) +Provides: glibc +Requires: eglibc-common = %{version}-%{release} +# Require libgcc in case some program calls pthread_cancel in its %%post +Requires(pre): libgcc +# This is for building auxiliary programs like memusage, nscd +# For initial glibc bootstraps it can be commented out +BuildRequires: zlib-devel +BuildRequires: libcap-devel +BuildRequires: gettext-tools >= 0.10.36 +# This is to ensure that __frame_state_for is exported by glibc +# will be compatible with egcs 1.x.y +BuildRequires: gcc >= 3.2 +# Need AS_NEEDED directive +# Need --hash-style=* support +BuildRequires: binutils >= 2.19.51.0.10 +BuildRequires: elfutils >= 0.72 +BuildRequires: rpm >= 4.2-0.56 + +%define enablekernel 2.6.25 +%ifarch %{ix86} +%define _target_cpu i686 +%endif +%ifarch i386 +%define nptl_target_cpu i486 +%else +%define nptl_target_cpu %{_target_cpu} +%endif + +%define __find_provides %{_builddir}/%{name}-%{version}/find_provides.sh +%define _filter_GLIBC_PRIVATE 1 + +%description +Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC) that is designed to work well on embedded systems. EGLIBC strives to be source and binary compatible with GLIBC. EGLIBC's goals include reduced footprint, configurable components, better support for cross-compilation and cross-testing. + +%package devel +Summary: Object files for development using standard C libraries +Group: Development/Libraries +#change back after booting with eglibc +#Requires(pre): %{name}-headers +#Requires: %{name}-headers = %{version}-%{release} +Requires(pre): glibc-headers +Requires: glibc-headers = %{version}-%{release} +Requires: %{name} = %{version}-%{release} +Provides: glibc-devel + +%description devel +The glibc-devel package contains the object files necessary +for developing programs which use the standard C libraries (which are +used by nearly all programs). If you are developing programs which +will use the standard C libraries, your system needs to have these +standard object files available in order to create the +executables. + +Install glibc-devel if you are going to develop programs which will +use the standard C libraries. + +%package static +Summary: C library static libraries for -static linking +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} +Provides: glibc-static + +%description static +The glibc-static package contains the C library static libraries +for -static linking. You don't need these, unless you link statically, +which is highly discouraged. + +%package headers +Summary: Header files for development using standard C libraries +Group: Development/Libraries +Provides: %{name}-headers(%{_target_cpu}) +Provides: glibc-headers(%{_target_cpu}) +Provides: glibc-headers +Obsoletes: glibc-headers(i586) +Obsoletes: glibc-headers(i686) +%ifarch x86_64 +# If both -m32 and -m64 is to be supported on AMD64, x86_64 glibc-headers +# have to be installed, not i586 ones. +Obsoletes: %{name}-headers(i586) +Obsoletes: %{name}-headers(i686) +%endif +Requires: %{name} = %{version}-%{release} + +%description headers +The glibc-headers package contains the header files necessary +for developing programs which use the standard C libraries (which are +used by nearly all programs). If you are developing programs which +will use the standard C libraries, your system needs to have these +standard header files available in order to create the +executables. + +Install glibc-headers if you are going to develop programs which will +use the standard C libraries. + +%package common +Summary: Common binaries and locale data for glibc +Requires: %{name} = %{version}-%{release} +Requires: tzdata >= 2003a +Requires: grep +Requires: findutils +Requires: coreutils +Group: System/Base +Provides: glibc-common + +%description common +The glibc-common package includes common binaries for the GNU libc +libraries, as well as national language (locale) support. + +%package -n nscd +Summary: A Name Service Caching Daemon (nscd) +Group: System/Daemons +Requires(pre): /sbin/chkconfig, /usr/sbin/useradd, /usr/sbin/userdel +Provides: glibc-nscd + +%description -n nscd +Nscd caches name service lookups and can dramatically improve +performance with NIS+, and may help with DNS as well. + +%package utils +Summary: Development utilities from GNU C library +Group: Development/Tools +Requires: %{name} = %{version}-%{release} +Provides: glibc-utils + +%description utils +The glibc-utils package contains memusage, a memory usage profiler, +mtrace, a memory leak tracer and xtrace, a function call tracer +which can be helpful during program debugging. + +If unsure if you need this, don't install this package. + + +%prep +%setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +# Hack here. +rm -rf manual +tar xf %SOURCE1 + +cat > find_provides.sh <<EOF +#!/bin/sh +/usr/lib/rpm/find-provides | grep -v GLIBC_PRIVATE +exit 0 +EOF +chmod +x find_provides.sh +touch `find . -name configure` +touch locale/programs/*-kw.h + +%build +GCC=gcc +GXX=g++ +# Fail to build with system flags.syslog.o: inline failed. +#BuildFlags="$RPM_OPT_FLAGS" +BuildFlags="-O2 -g" +echo %{ix86} +%ifarch %{ix86} +BuildFlags="$BuildFlags -march=core2 -mtune=atom" +%endif + +%ifnarch %{arm} +BuildFlags="$BuildFlags -fasynchronous-unwind-tables" +%endif + +EnableKernel="--enable-kernel=%{enablekernel}" +echo "$GCC" > Gcc