From 6b82531c7cd628b3abbec5cf7b63b5dd41bafa22 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Sat, 14 Jan 2012 10:49:22 -0300 Subject: Work done so far, decided to follow crosstool-ng log --- .../PKGBUILD | 33 +++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'cross/cross-mips64el-unknown-linux-gnu-glibc/PKGBUILD') diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-glibc/PKGBUILD index 62328c4bd..4dd3c364c 100644 --- a/cross/cross-mips64el-unknown-linux-gnu-glibc/PKGBUILD +++ b/cross/cross-mips64el-unknown-linux-gnu-glibc/PKGBUILD @@ -4,23 +4,25 @@ # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc # NOTE: valgrind requires rebuilt with each major glibc version - _pkgname=glibc _target="mips64el-unknown-linux-gnu" _sysroot="/usr/lib/cross-${_target}" -export PATH=${_sysroot}/bin:/usr/bin/cross/${_target}:$PATH +_ARCH=mips + +unset CFLAGS CXXFLAGS LDFLAGS pkgname=cross-${_target}-glibc pkgver=2.15 -pkgrel=1 +pkgrel=2 _glibcdate=20111227 pkgdesc="GNU C Library" arch=('i686' 'x86_64' 'mips64el') url="http://www.gnu.org/software/libc" license=('GPL' 'LGPL') groups=("${_target}-devel") -depends=('linux-api-headers>=3.1.6' 'tzdata') -# makedepends=("cross-${_target}-gcc-base>=4.6") +depends=("${_ARCH}-linux-api-headers>=3.1.6" 'tzdata') +makedepends=("cross-${_target}-binutils" + "cross-${_target}-gcc-core") backup=(etc/gai.conf etc/locale.gen etc/nscd.conf) @@ -132,30 +134,29 @@ build() { mkdir glibc-build cd glibc-build - if [[ ${CARCH} = "i686" ]]; then - # Hack to fix NPTL issues with Xen, only required on 32bit platforms - export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs" - fi - echo "slibdir=${_sysroot}/lib" >> configparms # remove hardening options from CFLAGS for building libraries CFLAGS=${CFLAGS/-fstack-protector/} CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/} + + BUILD_CC="gcc" \ + CC="${_target}-gcc" \ + AR="${_target}-ar" \ + RANLIB="${_target}-ranlib" \ ${srcdir}/glibc/configure \ - "--prefix=${_sysroot}" \ - "--bindir=/usr/bin" "--program-prefix=${_target}-" \ - "--with-sysroot=${_sysroot}" \ - "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \ + --prefix=${_sysroot} \ + --build=$CHOST --host=$_target \ --libdir=${_sysroot}/usr/lib --libexecdir=${_sysroot}/usr/lib \ - --with-headers=/usr/include \ + --with-headers=/usr/lib/${_ARCH}/include \ + --with-binutils=/usr/bin/cross/${_target} \ --enable-add-ons=nptl,libidn,ports \ --enable-kernel=2.6.27 \ --with-tls --with-__thread \ --enable-bind-now --without-gd \ --without-cvs --disable-profile \ - --enable-multi-arch + --enable-multi-arch --enable-shared # build libraries with hardening disabled echo "build-programs=no" >> configparms -- cgit v1.2.3-54-g00ecf