summaryrefslogtreecommitdiff
path: root/core/glibc/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'core/glibc/PKGBUILD')
-rw-r--r--core/glibc/PKGBUILD17
1 files changed, 15 insertions, 2 deletions
diff --git a/core/glibc/PKGBUILD b/core/glibc/PKGBUILD
index a6f6b5dff..4130bedcf 100644
--- a/core/glibc/PKGBUILD
+++ b/core/glibc/PKGBUILD
@@ -8,7 +8,7 @@ pkgname=glibc
pkgver=2.16.0
pkgrel=5
pkgdesc="GNU C Library"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url="http://www.gnu.org/software/libc"
license=('GPL' 'LGPL')
groups=('base')
@@ -20,6 +20,7 @@ backup=(etc/gai.conf
options=('!strip')
install=glibc.install
source=(http://ftp.gnu.org/gnu/libc/${pkgname}-${pkgver}.tar.xz{,.sig}
+ http://ftp.gnu.org/gnu/libc/${pkgname}-ports-${pkgver}.tar.xz{,.sig}
glibc-2.15-fix-res_query-assert.patch
glibc-2.16-unlock-mutex.patch
glibc-2.16-rpcgen-cpp-path.patch
@@ -34,6 +35,8 @@ source=(http://ftp.gnu.org/gnu/libc/${pkgname}-${pkgver}.tar.xz{,.sig}
locale-gen)
md5sums=('80b181b02ab249524ec92822c0174cf7'
'2a1221a15575820751c325ef4d2fbb90'
+ '9a2439641be7ca8b01a3175324013031'
+ '218fc97a9f8777ac2688174d431e7722'
'31f415b41197d85d3bbee3d1eecd06a3'
'0afcd8c6020d61684aba63ed5f26bd91'
'ea6a43915474e8276e9361eed6a01280'
@@ -82,6 +85,13 @@ build() {
# ldconfig does not need to look in /usr/lib64 or /usr/libx32 on Arch Linux
sed -i "s#add_system_dir#do_not_add_system_dir#" sysdeps/unix/sysv/linux/x86_64/dl-cache.h
+ if [ "${CARCH}" = "mips64el" ]; then
+ ln -s ../glibc-ports-${pkgver} ports
+
+ # Fix typo making util-linux build fail.
+ sed -i "s/_MIPS_SIM_ABIN32/_MIPS_SIM_NABI32/" ports/sysdeps/unix/sysv/linux/mips/Makefile
+ fi
+
cd ${srcdir}
mkdir glibc-build
cd glibc-build
@@ -90,6 +100,9 @@ build() {
# Hack to fix NPTL issues with Xen, only required on 32bit platforms
# TODO: make separate glibc-xen package for i686
export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
+ elif [[ ${CARCH} = "mips64el" ]]; then
+ # mips64el is only supported out of tree.
+ extra_addons=",ports"
fi
echo "slibdir=/usr/lib" >> configparms
@@ -101,7 +114,7 @@ build() {
${srcdir}/${pkgname}-${pkgver}/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
--with-headers=/usr/include \
- --enable-add-ons=nptl,libidn \
+ --enable-add-ons=nptl,libidn$extra_addons \
--enable-obsolete-rpc \
--enable-kernel=2.6.32 \
--enable-bind-now --disable-profile \