From e336aa546fc6d876e90b4a59453d30e9e582a582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Sun, 15 May 2011 20:21:39 -0300 Subject: cross-mips64el-unknown-linux-gnu-eglibc1 For some reason fails at the first pass, but when you delete src/headers/* and run it again with makepkg's -e flag it builds fine... --- cross-mips64el-unknown-linux-gnu-eglibc1/PKGBUILD | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 cross-mips64el-unknown-linux-gnu-eglibc1/PKGBUILD diff --git a/cross-mips64el-unknown-linux-gnu-eglibc1/PKGBUILD b/cross-mips64el-unknown-linux-gnu-eglibc1/PKGBUILD new file mode 100644 index 0000000..630a318 --- /dev/null +++ b/cross-mips64el-unknown-linux-gnu-eglibc1/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: Nicolas Reynolds +# + +_pkgname=eglibc +_target=mips64el-unknown-linux-gnu +_sysroot=/usr/lib/cross-${_target} + +pkgname=cross-${_target}-${_pkgname}1 +pkgver=2.13 +_svnrev=13055 +pkgrel=1 +pkgdesc="Embedded GNU C Library for $_target stage1" +license=('GPL' 'LGPL') +arch=(i686 x86_64) +options=(!strip) +depends=("cross-${_target}-linux-api-headers" "tzdata") +makedepends=('subversion' "cross-${_target}-binutils" "cross-${_target}-gcc1") +source=(http://repo.parabolagnulinux.org/others/eglibc-${pkgver}-${_svnrev}.tar.xz) +md5sums=('4b6d70ac23e40b2c60d6f9d5f63afe23') + +mksource() { + if [ -d eglibc ] ; then + cd eglibc + svn up + else + svn co http://www.eglibc.org/svn/branches/eglibc-2_13/libc eglibc + # TODO: might be nice to skip this if the target is supported in-tree. + cd eglibc + svn co http://www.eglibc.org/svn/branches/eglibc-2_13/ports ports + fi + + rev=$(LC_ALL=C svn info | sed -n 's/^Last Changed Rev: \([0-9]*\)$/\1/p') + + cd .. + tar cJf eglibc-sources-$pkgver-${rev}.tar.xz eglibc/ +} + +build() { + cd $srcdir + + [[ $NOEXTRACT -eq 1 ]] || mkdir headers + cd headers + + unset CFLAGS CXXFLAGS LDFLAGS + +# Points to gcc1 and binutils binaries + BUILD_CC=gcc \ + CC=$_sysroot/bin/$_target-gcc \ + CXX=$_sysroot/bin/$_target-g++ \ + AR=$_sysroot/bin/$_target-ar \ + RANLIB=$_sysroot/bin/$_target-ranlib \ + ../eglibc/configure \ + --prefix=$_sysroot \ + --build=$CHOST \ + --host=$_target \ + --with-headers=$_sysroot/include \ + --disable-profile \ + --without-gd \ + --without-cvs \ + --enable-add-ons +} + +package() { + cd $srcdir/headers + + make install-headers \ + install_root=$pkgdir \ + install-bootstrap-headers=yes + + mkdir -p ${pkgdir}${_sysroot}/lib + + make csu/subdir_lib + cp csu/crt1.o csu/crti.o csu/crtn.o $pkgdir${_sysroot}/lib/ + + $_sysroot/bin/$_target-gcc -nostdlib -nostartfiles -shared -x c /dev/null \ + -o $pkgdir${_sysroot}/lib/libc.so +} -- cgit v1.2.2