From 8ae8579090f6b8ad92a8a80df73084fbeffee5f2 Mon Sep 17 00:00:00 2001 From: aredridel Date: Sat, 11 Mar 2006 08:05:06 +0000 Subject: [PATCH] - added, NFY (doesn't build shared libs) Changed files: crossmipsel-uClibc.spec -> 1.1 --- crossmipsel-uClibc.spec | 104 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 crossmipsel-uClibc.spec diff --git a/crossmipsel-uClibc.spec b/crossmipsel-uClibc.spec new file mode 100644 index 0000000..1a4c785 --- /dev/null +++ b/crossmipsel-uClibc.spec @@ -0,0 +1,104 @@ +# +%bcond_with bootstrap # Build only headers +# +# TODO: +# - compile for m5307 +# - add support for flat shared libraries (-mid-shared-library) +# - make less ugly ? + +%define llh_version 2.4.31 + +Summary: C library optimized for size (mipsel version) +Summary(pl): Biblioteka C zoptymalizowana na rozmiar (dla mipsel) +Name: crossmipsel-uClibc +Version: 0.9.28 +Release: 1 +Epoch: 0 +License: LGPL +Group: Libraries +Source0: http://www.uclibc.org/downloads/uClibc-%{version}.tar.bz2 +# Source0-md5: 1ada58d919a82561061e4741fb6abd29 +Source1: http://www.uclibc.org/downloads/toolchain/linux-libc-headers-%{llh_version}.tar.bz2 +# Source1-md5: 997d36627baf6825c712431dee4d79d3 +Source2: crossmipsel-uClibc.config +URL: http://www.uclibc.org/ +%{?!with_bootstrap:BuildRequires: crossmipsel-gcc} +BuildRequires: sed >= 4.0 +BuildRequires: which +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%define target mipsel-pld-linux +%define arch %{_prefix}/%{target} + +%define _noautostrip .*%{arch}/lib/.*\\.[ao]$ + +%description +Small libc for building embedded applications. +Version compiled for mipsel. + +%description -l pl +Ma³a libc do budowania aplikacji wbudowanych. +Wersja dla mipsel. + +%prep +%setup -q -n uClibc-%{version} -a1 + +install %{SOURCE2} .config + +sed -i "s@^.*KERNEL_SOURCE.*\$@KERNEL_SOURCE=\"$PWD/linux-libc-headers-%{llh_version}\"@" \ + .config + +cd linux-libc-headers-%{llh_version}/include/asm-mips +grep '#include[[:space:]]\+' * | cut -f1 -d: | while read file; do + cat "../asm-mipsel/$file" > "$file" +done + +%build +%if %{with bootstrap} + %{__make} headers < /dev/null +%else + _build () { + local MULTILIB_SUBDIR=$1 + local PIC_CODE=$2 + local COMPILE_FLAGS=$3 + + cat .config | grep -v "HAVE_SHARED" > .config.tmp + cat .config.tmp | grep -v "BUILD_UCLIBC_LDSO" > .config + + if [ $PIC_CODE -ne 0 ]; then + sed -i 's/^.*DOPIC.*$/DOPIC=y/' .config + echo "HAVE_SHARED=n" >> .config + else + sed -i 's/^.*DOPIC.*$/# DOPIC is not set/' .config + fi + + %{__make} clean || exit 1 + %{__make} all ARCH_CFLAGS="$COMPILE_FLAGS"