[arch-commits] Commit in jemalloc/trunk (2 files)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Sat Jan 13 10:58:23 UTC 2018
Date: Saturday, January 13, 2018 @ 10:58:22
Author: bpiotrowski
Revision: 314679
1:5.0.1-4: add patch that fixes loading libjemalloc.so with dlopen()
Added:
jemalloc/trunk/0001-Add-the-mtls-dialect-gnu2-to-compile-flags.patch
Modified:
jemalloc/trunk/PKGBUILD
-------------------------------------------------------+
0001-Add-the-mtls-dialect-gnu2-to-compile-flags.patch | 42 ++++++++++++++++
PKGBUILD | 17 ++++--
2 files changed, 55 insertions(+), 4 deletions(-)
Added: 0001-Add-the-mtls-dialect-gnu2-to-compile-flags.patch
===================================================================
--- 0001-Add-the-mtls-dialect-gnu2-to-compile-flags.patch (rev 0)
+++ 0001-Add-the-mtls-dialect-gnu2-to-compile-flags.patch 2018-01-13 10:58:22 UTC (rev 314679)
@@ -0,0 +1,42 @@
+From 06c018012957ab963e2aa5245bf1fcfebcf4909a Mon Sep 17 00:00:00 2001
+From: Kenny MacDermid <kenny.macdermid at 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)
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-01-13 09:59:30 UTC (rev 314678)
+++ PKGBUILD 2018-01-13 10:58:22 UTC (rev 314679)
@@ -6,7 +6,7 @@
pkgname=jemalloc
epoch=1
pkgver=5.0.1
-pkgrel=3
+pkgrel=4
pkgdesc='General-purpose scalable concurrent malloc implementation'
arch=('x86_64')
license=('BSD')
@@ -14,13 +14,21 @@
depends=('glibc')
provides=('libjemalloc.so')
optdepends=('perl: for jeprof')
-source=("https://github.com/jemalloc/jemalloc/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2")
-sha256sums=('4814781d395b0ef093b21a08e8e6e0bd3dab8762f9935bbfb71679b0dea7c3e9')
+source=("https://github.com/jemalloc/jemalloc/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
+ '0001-Add-the-mtls-dialect-gnu2-to-compile-flags.patch')
+sha256sums=('4814781d395b0ef093b21a08e8e6e0bd3dab8762f9935bbfb71679b0dea7c3e9'
+ 'ac1570ab81c6545b8e994eab02239af67acdce682656c77802d090b0809176bf')
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p1 -i "$srcdir/0001-Add-the-mtls-dialect-gnu2-to-compile-flags.patch"
+ autoconf
+}
+
build() {
cd $pkgname-$pkgver
- ./configure --prefix=/usr
+ ./configure --enable-autogen --prefix=/usr
make
}
@@ -30,4 +38,5 @@
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+ chmod 644 "$pkgdir/usr/lib/libjemalloc_pic.a"
}
More information about the arch-commits
mailing list