extra/jemalloc to 5.0.1-4

This commit is contained in:
Kevin Mihelich 2018-01-24 13:51:14 +00:00
parent 92e66ca1f2
commit 05aa9c9d1b
2 changed files with 50 additions and 4 deletions

View file

@ -0,0 +1,42 @@
From 06c018012957ab963e2aa5245bf1fcfebcf4909a Mon Sep 17 00:00:00 2001
From: Kenny MacDermid <kenny.macdermid@gmail.com>
Date: Tue, 11 Jul 2017 22:45:22 -0300
Subject: [PATCH 1/2] Add the -mtls-dialect=gnu2 to compile flags.
When this option exists there is no need to add the tls_model attribute.
---
configure.ac | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 1551ded..39f957b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -701,6 +701,14 @@ if test "x${je_cv_attribute}" = "xyes" ; then
JE_CXXFLAGS_ADD([-fvisibility=hidden])
fi
fi
+dnl Check for tls-dialect support.
+JE_CFLAGS_ADD([-mtls-dialect=gnu2])
+if test "x$je_cv_cflags_added" = "x-mtls-dialect=gnu2" ; then
+ je_cv_tls_dialect_gnu2=yes
+else
+ je_cv_tls_dialect_gnu2=no
+fi
+JE_CXXFLAGS_ADD([-mtls-dialect=gnu2])
dnl Check for tls_model attribute support (clang 3.0 still lacks support).
JE_CFLAGS_SAVE()
JE_CFLAGS_ADD([-Werror])
@@ -711,7 +719,8 @@ JE_COMPILABLE([tls_model attribute], [],
foo = 0;],
[je_cv_tls_model])
JE_CFLAGS_RESTORE()
-if test "x${je_cv_tls_model}" = "xyes" ; then
+if test "x${je_cv_tls_dialect_gnu2}" = "xno" \
+ -a "x${je_cv_tls_model}" = "xyes" ; then
AC_DEFINE([JEMALLOC_TLS_MODEL],
[__attribute__((tls_model("initial-exec")))])
else
--
1.9.5 (Apple Git-50.3)

View file

@ -9,29 +9,32 @@
pkgname=jemalloc
epoch=1
pkgver=5.0.1
pkgrel=3.1
pkgrel=4
pkgdesc='General-purpose scalable concurrent malloc implementation'
arch=('i686' 'x86_64')
arch=('x86_64')
license=('BSD')
url='http://www.canonware.com/jemalloc/'
depends=('glibc')
provides=('libjemalloc.so')
optdepends=('perl: for jeprof')
source=("https://github.com/jemalloc/jemalloc/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
'0001-Add-the-mtls-dialect-gnu2-to-compile-flags.patch'
'https://github.com/jemalloc/jemalloc/commit/8cfc9dec37b312a2686f602bbcdd102ca07cca99.patch')
sha256sums=('4814781d395b0ef093b21a08e8e6e0bd3dab8762f9935bbfb71679b0dea7c3e9'
'ac1570ab81c6545b8e994eab02239af67acdce682656c77802d090b0809176bf'
'2a339806cb6366e31d26f4fbaed0d0c4e3b19a99479b15e74fd3580c70946774')
prepare() {
cd $pkgname-$pkgver
patch -p1 -i "$srcdir/0001-Add-the-mtls-dialect-gnu2-to-compile-flags.patch"
patch -p1 -i ../8cfc9dec37b312a2686f602bbcdd102ca07cca99.patch
autoconf
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr
./configure --enable-autogen --prefix=/usr
make
}
@ -41,4 +44,5 @@ package() {
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
chmod 644 "$pkgdir/usr/lib/libjemalloc_pic.a"
}