diff options
author | root <root@rshg054.dnsready.net> | 2012-01-23 23:15:06 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-01-23 23:15:06 +0000 |
commit | c6c657b8bcf062b5d19eff6298b7754c11838080 (patch) | |
tree | ed6a14e27d40adfcc821fe921e95aa9e9ab4585b /cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD | |
parent | 164067832916c8e59219e1b0f30d7d04618a536e (diff) |
Mon Jan 23 23:15:06 UTC 2012
Diffstat (limited to 'cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD')
-rw-r--r-- | cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD | 24 |
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 |