From 8b17c0c06c905cf95978e79c8077ac76304a37fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Mon, 16 Jan 2012 23:25:08 -0300 Subject: Got glibc-headers --- .../PKGBUILD | 168 +++++++++++++-------- 1 file changed, 107 insertions(+), 61 deletions(-) (limited to 'cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD') diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD index 26026c6b0..ea816086f 100644 --- a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD +++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD @@ -6,27 +6,28 @@ _pkgname=glibc _target="mips64el-unknown-linux-gnu" -_sysroot="/usr/lib/${_target}" +_sysroot="/usr/${_target}" _ARCH=mips unset CFLAGS CXXFLAGS LDFLAGS pkgname=cross-${_target}-glibc-headers pkgver=2.15 -pkgrel=3 +pkgrel=4 _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=("${_ARCH}-linux-api-headers>=3.1.6" 'tzdata') +depends=("${_target}-linux-api-headers>=3.1.6" 'tzdata') makedepends=("cross-${_target}-binutils" "cross-${_target}-gcc-core") options=('!strip') install=glibc.install source=(ftp://ftp.archlinux.org/other/glibc/${_pkgname}-${pkgver}_${_glibcdate}.tar.xz http://repo.parabolagnulinux.org/other/glibc-ports-${pkgver}_${_glibcdate}.tar.xz + configure.patch glibc-2.10-dont-build-timezone.patch glibc-2.10-bz4781.patch glibc-__i686.patch @@ -69,7 +70,7 @@ mksource() { } mksource-ports() { - git clone http://sourceware.org/git/glibc-ports.git + tsocks git clone git://sourceware.org/git/glibc-ports.git pushd glibc-ports git checkout -b glibc-${pkgver}-arch origin/release/${pkgver}/master popd @@ -79,48 +80,52 @@ mksource-ports() { build() { cd ${srcdir}/glibc - # timezone data is in separate package (tzdata) - patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch + # export PATH=${_sysroot}/bin/:$PATH - # http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781 - patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch + # timezone data is in separate package (tzdata) + patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch - # http://sources.redhat.com/bugzilla/show_bug.cgi?id=411 - # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html - patch -Np1 -i ${srcdir}/glibc-__i686.patch + # http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781 + patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch - # http://www.exploit-db.com/exploits/15274/ - # http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (only fedora branch...) - patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch + # http://sources.redhat.com/bugzilla/show_bug.cgi?id=411 + # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html + patch -Np1 -i ${srcdir}/glibc-__i686.patch - # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (only fedora branch...) - # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html - patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch + # http://www.exploit-db.com/exploits/15274/ + # http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (only fedora branch...) + patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch - # Revert commit causing issues with crappy DNS servers... - # Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER! - # Note that both these patches appear not to fix the issue completely: - # http://sourceware.org/bugzilla/show_bug.cgi?id=13013 - # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (only fedora branch...) - patch -Np1 -i ${srcdir}/glibc-2.14-revert-4768ae77.patch + # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (only fedora branch...) + # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html + patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch - # re-export RPC interface until libtirpc is ready as a replacement - # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...) - patch -Np1 -i ${srcdir}/glibc-2.14-reexport-rpc-interface.patch - # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...) - patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch + # Revert commit causing issues with crappy DNS servers... + # Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER! + # Note that both these patches appear not to fix the issue completely: + # http://sourceware.org/bugzilla/show_bug.cgi?id=13013 + # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (only fedora branch...) + patch -Np1 -i ${srcdir}/glibc-2.14-revert-4768ae77.patch - # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223 - # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (only fedora branch...) - patch -Np1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch + # re-export RPC interface until libtirpc is ready as a replacement + # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...) + patch -Np1 -i ${srcdir}/glibc-2.14-reexport-rpc-interface.patch + # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...) + patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch - # revert commit c5a0802a - causes various hangs - # https://bugzilla.redhat.com/show_bug.cgi?id=769421 - patch -Np1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch + # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223 + # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (only fedora branch...) + patch -Np1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch - # revert optimized math routines that can cause crashes (FS#27736, FS#27743) - # obviously not a real fix... - patch -Np1 -i ${srcdir}/glibc-2.15-math64crash.patch + # revert commit c5a0802a - causes various hangs + # https://bugzilla.redhat.com/show_bug.cgi?id=769421 + patch -Np1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch + + # revert optimized math routines that can cause crashes (FS#27736, FS#27743) + # obviously not a real fix... + patch -Np1 -i ${srcdir}/glibc-2.15-math64crash.patch + + patch -Np0 -i ${srcdir}/configure.patch ln -s ../glibc-ports ports @@ -128,32 +133,73 @@ build() { mkdir glibc-build cd glibc-build - echo "slibdir=${_sysroot}/lib" >> configparms - -# From crosstool-ng: -# glibc's prefix must be exactly /usr, else --with-sysroot'd gcc will get -# confused when $sysroot/usr/include is not present. -# Note: --prefix=/usr is magic! -# See http://www.gnu.org/software/libc/FAQ.html#s-2.2 - export PATH=${_sysroot}/bin:$PATH - - BUILD_CC="${CHOST}-gcc" \ - CC="${_target}-gcc -O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop" \ - AR="${_target}-ar" \ - RANLIB="${_target}-ranlib" \ - ${srcdir}/glibc/configure \ - --prefix=/usr \ - --build=$CHOST --host=$_target \ - --with-headers=/usr/lib/${_ARCH}/include \ - --libdir=${_sysroot}/usr/lib --libexecdir=${_sysroot}/usr/lib \ - --enable-add-ons=nptl,libidn,ports \ - --enable-kernel=2.6.27 \ - --with-tls --with-__thread \ - --without-gd \ - --without-cvs --disable-profile + echo "libc_cv_ctors_header=no" >> config.cache + echo "libc_cv_forced_unwind=yes" >> config.cache + echo "libc_cv_c_cleanup=yes" >> config.cache + + BUILD_CC=${CHOST}-gcc \ + CFLAGS=" -EL -march=loongson2f -mabi=n32 -O2 -U_FORTIFY_SOURCE " \ + CC=${_target}-gcc \ + AR=${_target}-ar \ + RANLIB=${_target}-ranlib \ + ${srcdir}/glibc/configure \ + --prefix=/usr \ + --build=${CHOST} \ + --host=${_target} \ + --without-cvs \ + --disable-profile \ + --without-gd \ + --with-headers=/usr/${_target}/usr/include \ + --cache-file=${srcdir}/glibc-build/config.cache \ + --disable-debug \ + --disable-sanity-checks \ + --enable-kernel=2.6.27 \ + --with-__thread \ + --with-tls \ + --enable-shared \ + --with-fp \ + --enable-add-ons=nptl,ports + } package() { cd ${srcdir}/glibc-build - make install_root=${pkgdir} install-bootstrap-headers=yes install-headers + headers_dir=${pkgdir}${_sysroot}/usr/include + + make ${MAKEFLAGS} install_root=${pkgdir}${_sysroot} all-bootstrap-headers=yes install-headers + + msg "Installing some headers manually" + mkdir -p "${headers_dir}/gnu" + touch "${headers_dir}/gnu/stubs.h" + cp -v "${srcdir}/glibc/include/features.h" "${headers_dir}/features.h" + cp -v bits/stdio_lim.h "${headers_dir}/bits/stdio_lim.h" + + mkdir -p ${pkgdir}${_sysroot}/usr/lib + + make csu/subdir_lib + cp csu/crt1.o csu/crti.o csu/crtn.o ${pkgdir}${_sysroot}/usr/lib + + ${_target}-gcc -nostdlib \ + -nostartfiles \ + -shared \ + -x c /dev/null \ + -o ${pkgdir}${_sysroot}/usr/lib/libc.so + } +md5sums=('6ffdf5832192b92f98bdd125317c0dfc' + '98d028ee63fca2821414ebcac0af0e5b' + '39f80ba6bcda6b010a66f9c61e9a0017' + '4dadb9203b69a3210d53514bb46f41c3' + '0c5540efc51c0b93996c51b57a8540ae' + '40cd342e21f71f5e49e32622b25acc52' + 'b042647ea7d6f22ad319e12e796bd13e' + '6970bcfeb3bf88913436d5112d16f588' + '7da8c554a3b591c7401d7023b1928afc' + 'c5de2a946215d647c8af5432ec4b0da0' + '55febbb72139ac7b65757df085024b83' + '3c219ddfb619b6df903cac4cc42c611d' + '7ae3e426251ae33e73dbad71f9c91378' + 'dc7550e659ddd685bd78a930d15a01f2' + 'b587ee3a70c9b3713099295609afde49' + '07ac979b6ab5eeb778d55f041529d623' + '476e9113489f93b348b21e144b6a8fcf') -- cgit v1.2.3-2-g168b