SPECS: uClibc.spec - merge fixes from LINUX_2_6_22 branch
glen
glen at pld-linux.org
Wed Apr 2 01:46:25 CEST 2008
Author: glen Date: Tue Apr 1 23:46:25 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- merge fixes from LINUX_2_6_22 branch
---- Files affected:
SPECS:
uClibc.spec (1.157 -> 1.158)
---- Diffs:
================================================================
Index: SPECS/uClibc.spec
diff -u SPECS/uClibc.spec:1.157 SPECS/uClibc.spec:1.158
--- SPECS/uClibc.spec:1.157 Tue Apr 1 21:14:54 2008
+++ SPECS/uClibc.spec Wed Apr 2 01:46:20 2008
@@ -1,23 +1,12 @@
# $Revision$, $Date$
-# TODO
-# - unpackaged list:
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-addr2line
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-ar
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-as
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-c++
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-cc
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-cpp
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-g++
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-gasp
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-gcc
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-ld
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-nm
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-objcopy
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-objdump
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-ranlib
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-size
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-strings
-# /usr/x86_64-linux-uclibc/bin/x86_64-uclibc-strip
+#
+# Conditional build:
+%bcond_without shared # don't build shared lib support
+#
+%ifarch %{x8664}
+%undefine with_shared
+%endif
+#
Summary: C library optimized for size
Summary(pl.UTF-8): Biblioteka C zoptymalizowana na rozmiar
Name: uClibc
@@ -36,6 +25,7 @@
Patch5: %{name}-sparc.patch
URL: http://uclibc.org/
BuildRequires: binutils-gasp
+BuildRequires: cpp
BuildRequires: gcc >= 5:3.0
BuildRequires: linux-libc-headers >= 7:2.6.24
BuildRequires: sed >= 4.0
@@ -124,6 +114,9 @@
s/^.*UCLIBC_HAS_RPC.*/UCLIBC_HAS_RPC=y\n# UCLIBC_HAS_FULL_RPC is not set\n# UCLIBC_HAS_REENTRANT_RPC is not set/;
s/^.*UCLIBC_HAS_SYS_SIGLIST.*$/UCLIBC_HAS_SYS_SIGLIST=y/;
s,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX="$(RUNTIME_PREFIX)/lib",
+%if %{with shared}
+ s/^\(HAVE_SHARED\)=y/# \1 is not set/;
+%endif
s/^.*UCLIBC_HAS_PRINTF_M_SPEC.*$/UCLIBC_HAS_PRINTF_M_SPEC=y/;
s/^.*UCLIBC_SUSV3_LEGACY.*$/UCLIBC_SUSV3_LEGACY=y\nUCLIBC_SUSV3_LEGACY_MACROS=y/;
s/^.*\<DOSTRIP\>.*$/# DOSTRIP is not set/;
@@ -155,18 +148,52 @@
CC="%{__cc}" \
PREFIX=$RPM_BUILD_ROOT
+%if %{with shared}
mv -f $RPM_BUILD_ROOT%{uclibc_root}/usr/lib/{libpthread-uclibc,libpthread}.so
ln -sf libpthread-0.9.29.so $RPM_BUILD_ROOT%{uclibc_root}/lib/libpthread.so.0
+%endif
# these links are *needed* (by stuff in bin/)
for f in $RPM_BUILD_ROOT%{uclibc_root}/bin/*; do
- mv -f $f $RPM_BUILD_ROOT%{_bindir}
- ln -sf ../../bin/`basename $f` $f
+ if [ -L $f ]; then
+ l=$(readlink $f)
+ a=${l##*/}
+ d=${l%/*}
+ case "$d" in
+ %{_bindir})
+ ln -sf ${l#%{_bindir}/} $RPM_BUILD_ROOT%{_bindir}/${f##*/}
+ rm -f $f
+ ;;
+ $a)
+ mv -f $f $RPM_BUILD_ROOT%{_bindir}
+ ;;
+ *)
+ exit 1
+ ;;
+ esac
+ else
+ a=${f#*/%{_target_cpu}-uclibc-}
+ ln -sf %{_bindir}/$(basename $f) $RPM_BUILD_ROOT%{uclibc_root}/usr/bin/$a
+ mv -f $f $RPM_BUILD_ROOT%{_bindir}
+ fi
done
-for f in c++ cc g++ gcc ld; do
- ln -sf /usr/bin/%{_target_cpu}-uclibc-$f \
- $RPM_BUILD_ROOT%{uclibc_root}/usr/bin/$f
+for f in $RPM_BUILD_ROOT%{uclibc_root}/usr/bin/*; do
+ if [ -L $f ]; then
+ l=$(readlink $f)
+ case "${l%/*}" in
+ %{uclibc_root}/bin)
+ a=${l#*/%{_target_cpu}-uclibc-}
+ ln -sf %{_bindir}/$a $f
+ ;;
+ %{_bindir})
+ :
+ ;;
+ *)
+ exit 2
+ ;;
+ esac
+ fi
done
rm -rf $RPM_BUILD_ROOT%{uclibc_root}/usr/include/{linux,asm*}
@@ -187,9 +214,11 @@
%doc Changelog* DEDICATION.mjn3 MAINTAINERS README TODO
%dir %{uclibc_root}
%ifarch %{ix86} %{x8664} ppc sparc sparcv9
+%if %{with shared}
%dir %{uclibc_root}/lib
%attr(755,root,root) %{uclibc_root}/lib/*.so*
%endif
+%endif
%files devel
%defattr(644,root,root,755)
@@ -200,10 +229,12 @@
%dir %{uclibc_root}/usr/bin
%attr(755,root,root) %{uclibc_root}/usr/bin/*
%dir %{uclibc_root}/usr/lib
+%if %{with shared}
%{uclibc_root}/usr/lib/uclibc_nonshared.a
%ifarch %{ix86} %{x8664} ppc sparc sparcv9
%attr(755,root,root) %{uclibc_root}/usr/lib/*.so
%endif
+%endif
%{uclibc_root}/usr/include
%files static
@@ -216,6 +247,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.158 2008-04-01 23:46:20 glen
+- merge fixes from LINUX_2_6_22 branch
+
Revision 1.157 2008-04-01 19:14:54 glen
- really always disable stripping not only with %{?debug}
- use inline sed edit
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/uClibc.spec?r1=1.157&r2=1.158&f=u
More information about the pld-cvs-commit
mailing list