summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-05-15 20:21:39 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-05-15 20:21:39 -0300
commite336aa546fc6d876e90b4a59453d30e9e582a582 (patch)
tree9a99b35c9ca3b064702137d84cddf6a6194ae0e5
parent2bb78cec4c286fb8b3056138779e2801e7370425 (diff)
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...
-rw-r--r--cross-mips64el-unknown-linux-gnu-eglibc1/PKGBUILD77
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
+}