summaryrefslogtreecommitdiff
path: root/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-01-23 11:55:00 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-01-23 11:55:00 -0300
commit66de65eb20a4e6af15d10616fd566cdba54c6af8 (patch)
treeeaa12ac751d43b0bcd776e287fd6e3f0fc9f329e /cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD
parent7d7896609403ba5b003135191db6a69f6c3af97e (diff)
Cross toolchain finished
Diffstat (limited to 'cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD')
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD24
1 files changed, 22 insertions, 2 deletions
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD b/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD
index e5e37beee..18de66776 100644
--- a/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD
+++ b/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD
@@ -4,11 +4,21 @@
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: valgrind requires rebuilt with each major glibc version
+# NOTE: I had to run this after installing target-glibc to build target-gcc:
+# for lib in /usr/${_target}/usr/lib/*; do
+# ln -s ${lib} /usr/${_target}/lib/$(basename ${lib}
+# done
+# gcc build should probably add a -B flag to usr/lib instead
+
_pkgname=glibc
_target="mips64el-unknown-linux-gnu"
_sysroot="/usr/${_target}"
_ARCH=mips
+# Disable this after building final gcc
+# Otherwise you'll get ld: missing libc.so errors
+BOOTSTRAPING=true
+
unset CFLAGS CXXFLAGS LDFLAGS
pkgname=${_target}-glibc
@@ -21,7 +31,7 @@ url="http://www.gnu.org/software/libc"
license=('GPL' 'LGPL')
groups=("${_target}-devel")
depends=("${_target}-linux-api-headers>=3.1.6" 'tzdata')
-makedepends=("cross-${_target}-binutils"
+makedepends=("${_target}-binutils"
"cross-${_target}-gcc-core-shared"
"cross-${_target}-glibc-headers")
backup=(etc/gai.conf
@@ -174,7 +184,7 @@ build() {
# --libdir=${_sysroot}/usr/lib \
# --libexecdir=${_sysroot}/usr/lib \
-
+
# build libraries with hardening disabled
echo "build-programs=no" >> configparms
make
@@ -202,6 +212,16 @@ package() {
rm -f ${pkgdir}${_sysroot}/etc/ld.so.{cache,conf}
+# Compat symlinks
+ ln -s ${_sysroot}/usr/lib ${pkgdir}${_sysroot}/lib
+ ln -s ${_sysroot}/lib ${pkgdir}${_sysroot}/lib32
+
+# Fix libc.so to find correct libraries
+ if ${BOOTSTRAPING}; then
+ sed -i "s|/lib|${_sysroot}&|g" ${pkgdir}${_sysroot}/usr/lib/libc.so
+ sed -i "s|/lib|${_sysroot}&|g" ${pkgdir}${_sysroot}/usr/lib/libpthreads.so
+ fi
+
install -dm755 ${pkgdir}${_sysroot}/etc/rc.d
install -dm755 ${pkgdir}${_sysroot}/usr/sbin
install -dm755 ${pkgdir}${_sysroot}/usr/lib/locale