diff options
-rw-r--r-- | cross-mips64el-unknown-linux-gnu-eglibc1/PKGBUILD | 77 |
1 files changed, 77 insertions, 0 deletions
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 <fauno@kiwwwi.com.ar> +# + +_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 +} |