From 72ce460dbc2e6b12a23d0cdef86d0516531a0cfc Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 19 Feb 2013 12:58:36 +0100 Subject: [PATCH] chroot-glibc: cross build support; strip all files. --- srcpkgs/chroot-glibc/template | 38 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/srcpkgs/chroot-glibc/template b/srcpkgs/chroot-glibc/template index 7c168afd805..abafbcfe97c 100644 --- a/srcpkgs/chroot-glibc/template +++ b/srcpkgs/chroot-glibc/template @@ -3,7 +3,7 @@ pkgname=chroot-glibc _majorver=2.17 version=${_majorver} wrksrc="glibc-${version}" -revision=2 +revision=3 short_desc="The GNU C library -- for xbps-src use" maintainer="Juan RP " homepage="http://www.gnu.org/software/libc" @@ -11,19 +11,31 @@ license="GPL-2, LGPL-2.1, BSD" distfiles="http://ftp.gnu.org/gnu/glibc/glibc-${version}.tar.xz" checksum=6914e337401e0e0ade23694e1b2c52a5f09e4eda3270c67e7c3ba93a89b5b23e -nostrip=yes -disable_debug=yes noverifyrdeps=yes bootstrap=yes provides="glibc-${version} glibc-devel-${version}" conflicts="glibc>=0 glibc-devel>=0" +#Do not strip these files (objcopy errors out). +nostrip_files=" + XBS5_ILP32_OFFBIG + XBS5_ILP32_OFF32 + POSIX_V6_ILP32_OFF32 + POSIX_V6_ILP32_OFFBIG + POSIX_V7_ILP32_OFF32 + POSIX_V7_ILP32_OFFBIG + POSIX_V6_LP64_OFF64 + POSIX_V7_LP64_OFF64 + XBS5_LP64_OFF64" + if [ -n "$IN_CHROOT" ]; then makedepends="bison perl" fi do_configure() { - mkdir build && cd build + [ ! -d build ] && mkdir build + cd build + echo "slibdir=/usr/lib" > configparms echo "bindir=/usr/bin" >> configparms echo "sbindir=/usr/sbin" >> configparms @@ -32,16 +44,24 @@ do_configure() { # with Xen on x86 32bit. if [ "${XBPS_MACHINE}" = "i686" ]; then export CFLAGS="$CFLAGS -mno-tls-direct-seg-refs" + elif [ "$XBPS_MACHINE" = "armv6l" ]; then + # Force hard float ABI. + # To build for soft float: --with-float=soft --without-fp. + _floatabi="--with-float=hard" + fi + if [ -n "$XBPS_CROSS_TRIPLET" ]; then + _headers="--with-headers=/usr/$XBPS_CROSS_TRIPLET/include" + else + _headers="--with-headers=/usr/include" fi - SHELL=/bin/bash ../configure \ - ${CONFIGURE_SHARED_ARGS} \ - --enable-add-ons=nptl,libidn --enable-obsolete-rpc \ - --enable-multi-arch \ + SHELL=/bin/bash ../configure ${CONFIGURE_SHARED_ARGS} \ + --enable-add-ons=ports,nptl,libidn \ + --enable-multi-arch --enable-obsolete-rpc \ --enable-bind-now --enable-kernel=2.6.27 \ --enable-stack-guard-randomization --disable-profile \ --without-cvs --without-gd --libexecdir=/usr/lib \ - --libdir=/usr/lib --with-headers=${XBPS_MASTERDIR}/usr/include + --libdir=/usr/lib ${_floatabi} ${_headers} } do_build() {