]> git.pld-linux.org Git - packages/uClibc.git/blobdiff - uClibc.spec
- rediff patches
[packages/uClibc.git] / uClibc.spec
index ac06976765ea46a8449a332fc6042b24e015842a..e3d5655e620fc96406b1725a7dcab75ef7a3e2d7 100644 (file)
@@ -1,11 +1,8 @@
 #
-# TODO:
-# - add filtering out -Wl,-z,-combreloc in gcc wrapper
-#   (causes linking to be done against glibc instead of uclibc)
-#
 # Conditional build:
 %bcond_without shared          # don't build shared lib support
-%bcond_with    verbose         # verbose mode
+%bcond_with    nptl            # libpthread: NPTL instead of LinuxThreads (experimental; no i386)
+%bcond_without verbose         # verbose mode
 #
 %ifarch alpha
 %undefine      with_shared
 Summary:       C library optimized for size
 Summary(pl.UTF-8):     Biblioteka C zoptymalizowana na rozmiar
 Name:          uClibc
-Version:       0.9.29
-Release:       17
-Epoch:         2
+Version:       0.9.33.2
+Release:       34
+Epoch:         4
 License:       LGPL v2.1
 Group:         Libraries
-Source0:       http://uclibc.org/downloads/%{name}-%{version}.tar.bz2
-# Source0-md5: 61dc55f43b17a38a074f347e74095b20
+Source0:       http://uclibc.org/downloads/%{name}-%{version}.tar.xz
+# Source0-md5: 73e6fe215648d02246f4d195b25fb17e
 Patch0:                %{name}-newsoname.patch
 Patch1:                %{name}-toolchain-wrapper.patch
 Patch2:                %{name}-targetcpu.patch
 Patch3:                %{name}-debug.patch
 Patch4:                %{name}-stdio-unhide.patch
-Patch5:                %{name}-sparc.patch
+Patch5:                %{name}-kernel-types.patch
+Patch6:                %{name}-features.patch
 URL:           http://uclibc.org/
-BuildRequires: binutils-gasp
+BuildRequires: binutils >= 2.16
 BuildRequires: cpp
+%if %{with nptl}
+BuildRequires: gcc >= 5:4.1
+%else
 BuildRequires: gcc >= 5:3.0
-BuildRequires: linux-libc-headers >= 7:2.6.24
+%endif
+BuildRequires: linux-libc-headers >= 7:2.6.27
+BuildRequires: make >= 3.80
+BuildRequires: ncurses-devel
+BuildRequires: rpmbuild(macros) >= 1.453
 BuildRequires: sed >= 4.0
+BuildRequires: tar >= 1:1.22
 BuildRequires: which
+BuildRequires: xz
+%{?with_nptl:Requires: uname(version) >= 2.6}
+# only these supported by this .spec; uClibc code supports some more
 ExclusiveArch: alpha %{ix86} ppc sparc sparcv9 %{x8664}
+%{?with_nptl:ExcludeArch:      i386}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%if "%{cc_version}" >= "4.2"
 %define                specflags       -fgnu89-inline
+%endif
+
+%define                filterout       -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4
 
 %define                uclibc_root     /usr/%{_target_cpu}-linux-uclibc
 
@@ -52,8 +66,7 @@ Summary:      Development files for uClibc
 Summary(pl.UTF-8):     Pliki dla programistów uClibc
 Group:         Development/Libraries
 Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      binutils
-Requires:      linux-libc-headers >= 7:2.6.24
+Requires:      linux-libc-headers >= 7:2.6.27
 %requires_eq   gcc
 
 %description devel
@@ -82,12 +95,12 @@ Biblioteki statyczne uClibc.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-# check if it's needed now... ldso is broken on sparc anyway
-#%patch5 -p1
+%patch5 -p1
+%patch6 -p1
 
 # ARCH is already determined by uname -m
 %ifarch %{ix86}
-defconfig=extra/Configs/defconfigs/i386
+defconfig=extra/Configs/defconfigs/i386/defconfig
 %ifarch i386
 echo 'CONFIG_386=y' >> $defconfig
 %endif
@@ -111,22 +124,26 @@ echo 'CONFIG_K7=y' >> $defconfig
 %endif
 %endif
 %ifarch %{x8664}
-defconfig=extra/Configs/defconfigs/x86_64
+defconfig=extra/Configs/defconfigs/x86_64/defconfig
 %endif
 %ifarch alpha
-defconfig=extra/Configs/defconfigs/alpha
+defconfig=extra/Configs/defconfigs/alpha/defconfig
 %endif
 %ifarch sparc sparcv9
-defconfig=extra/Configs/defconfigs/sparc
+defconfig=extra/Configs/defconfigs/sparc/defconfig
 %endif
 %ifarch ppc
-defconfig=extra/Configs/defconfigs/powerpc
+defconfig=extra/Configs/defconfigs/powerpc/defconfig
 %endif
 %ifarch ia64
-defconfig=extra/Configs/defconfigs/ia64
+defconfig=extra/Configs/defconfigs/ia64/defconfig
 %endif
 
 cat <<'EOF' >> $defconfig
+# HAS_NO_THREADS is not set
+%{!?with_nptl:LINUXTHREADS_OLD=y}
+%{?with_nptl:UCLIBC_HAS_THREADS_NATIVE=y}
+UCLIBC_HAS_IPV4=y
 UCLIBC_HAS_IPV6=y
 DO_C99_MATH=y
 UCLIBC_HAS_RPC=y
@@ -134,6 +151,7 @@ UCLIBC_HAS_RPC=y
 # UCLIBC_HAS_REENTRANT_RPC is not set
 UCLIBC_HAS_SYS_SIGLIST=y
 SHARED_LIB_LOADER_PREFIX="$(RUNTIME_PREFIX)/lib"
+LDSO_GNU_HASH_SUPPORT=y
 %if %{without shared}
 HAVE_NO_SHARED=y
 # HAVE_SHARED is not set
@@ -141,6 +159,13 @@ HAVE_NO_SHARED=y
 UCLIBC_HAS_PRINTF_M_SPEC=y
 UCLIBC_SUSV3_LEGACY=y
 UCLIBC_SUSV3_LEGACY_MACROS=y
+UCLIBC_SUSV4_LEGACY=y
+UCLIBC_USE_NETLINK=y
+UCLIBC_SUPPORT_AI_ADDRCONFIG=y
+UCLIBC_HAS_RESOLVER_SUPPORT=y
+UCLIBC_HAS_LIBRESOLV_STUB=y
+UCLIBC_HAS_COMPAT_RES_STATE=y
+UCLIBC_HAS_EXTRA_COMPAT_RES_STATE=y
 # DOSTRIP is not set
 %{?debug:DODEBUG=y}
 %{?debug:SUPPORT_LD_DEBUG=y}
@@ -148,15 +173,19 @@ UCLIBC_SUSV3_LEGACY_MACROS=y
 EOF
 
 %build
+# use ld.bfd; gold doesn't work well for now
+install -d our-ld
+ln -s %{_bindir}/ld.bfd our-ld/ld
+PATH=$(pwd)/our-ld:$PATH; export PATH
 
 # NOTE: 'defconfig' and 'all' must be run in separate make process because of macros
-%{__make} defconfig \
+%{__make} -j1 defconfig \
        %{?with_verbose:VERBOSE=1} \
        TARGET_CPU="%{_target_cpu}" \
        GCC_BIN=%{_host_cpu}-%{_vendor}-%{_os}-gcc \
        HOSTCC="%{__cc}" \
-       HOSTCFLAGS="%{rpmcflags} %{rpmldflags}" \
        CC="%{__cc}" \
+       HOSTCFLAGS="%{rpmcflags} %{rpmldflags}" \
        OPTIMIZATION="%{rpmcflags} -Os"
 
 # The Makefile includes .config and later tries to assign same variable,
@@ -165,14 +194,14 @@ EOF
 # So we pass it as make arg to be sure it's proper!
 target_arch=$(grep -s '^TARGET_ARCH' .config | sed -e 's/^TARGET_ARCH=//' -e 's/"//g')
 
-%{__make} \
+%{__make} -j1 \
        %{?with_verbose:VERBOSE=1} \
        TARGET_CPU="%{_target_cpu}" \
        TARGET_ARCH=$target_arch \
        GCC_BIN=%{_host_cpu}-%{_vendor}-%{_os}-gcc \
        HOSTCC="%{__cc}" \
-       HOSTCFLAGS="%{rpmcflags} %{rpmldflags}" \
        CC="%{__cc}" \
+       HOSTCFLAGS="%{rpmcflags} %{rpmldflags}" \
        OPTIMIZATION="%{rpmcflags} -Os"
 
 %install
@@ -189,8 +218,10 @@ install -d $RPM_BUILD_ROOT%{_bindir}
        DESTDIR=$RPM_BUILD_ROOT
 
 %if %{with shared}
+%if %{without nptl}
 mv -f $RPM_BUILD_ROOT%{uclibc_root}/usr/lib/{libpthread-uclibc,libpthread}.so
 ln -sf libpthread-%{version}.so $RPM_BUILD_ROOT%{uclibc_root}/lib/libpthread.so.0
+%endif
 chmod a+rx $RPM_BUILD_ROOT%{uclibc_root}/lib/*.so
 %endif
 
@@ -237,15 +268,10 @@ for f in $RPM_BUILD_ROOT%{uclibc_root}/usr/bin/*; do
        fi
 done
 
-rm -rf $RPM_BUILD_ROOT%{uclibc_root}/usr/include/{linux,asm*}
-ln -sf /usr/include/asm $RPM_BUILD_ROOT%{uclibc_root}/usr/include/asm
-ln -sf /usr/include/asm-generic $RPM_BUILD_ROOT%{uclibc_root}/usr/include/asm-generic
-# for future use
-%ifarch sparc64
-ln -sf /usr/include/asm-sparc $RPM_BUILD_ROOT%{uclibc_root}/usr/include/asm-sparc
-ln -sf /usr/include/asm-sparc64 $RPM_BUILD_ROOT%{uclibc_root}/usr/include/asm-sparc64
-%endif
-ln -sf /usr/include/linux $RPM_BUILD_ROOT%{uclibc_root}/usr/include/linux
+# rpm -ql linux-libc-headers | awk -F/ ' /^\/usr\/include\// { print "/usr/include/" $4 } ' | sort -u
+for dir in asm asm-generic linux mtd rdma sound video xen; do
+       ln -sf /usr/include/${dir} $RPM_BUILD_ROOT%{uclibc_root}/usr/include/${dir}
+done
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -271,7 +297,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/%{_target_cpu}-uclibc-cc
 %attr(755,root,root) %{_bindir}/%{_target_cpu}-uclibc-cpp
 %attr(755,root,root) %{_bindir}/%{_target_cpu}-uclibc-g++
-%attr(755,root,root) %{_bindir}/%{_target_cpu}-uclibc-gasp
 %attr(755,root,root) %{_bindir}/%{_target_cpu}-uclibc-gcc
 %attr(755,root,root) %{_bindir}/%{_target_cpu}-uclibc-ld
 %attr(755,root,root) %{_bindir}/%{_target_cpu}-uclibc-nm
@@ -291,7 +316,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{uclibc_root}/usr/bin/cc
 %attr(755,root,root) %{uclibc_root}/usr/bin/cpp
 %attr(755,root,root) %{uclibc_root}/usr/bin/g++
-%attr(755,root,root) %{uclibc_root}/usr/bin/gasp
 %attr(755,root,root) %{uclibc_root}/usr/bin/gcc
 %attr(755,root,root) %{uclibc_root}/usr/bin/ld
 %attr(755,root,root) %{uclibc_root}/usr/bin/nm
This page took 0.077276 seconds and 4 git commands to generate.