* [gentoo-commits] repo/gentoo:master commit in: dev-libs/jemalloc/, dev-libs/jemalloc/files/
@ 2016-03-29 2:16 Ian Stakenvicius
0 siblings, 0 replies; 4+ messages in thread
From: Ian Stakenvicius @ 2016-03-29 2:16 UTC (permalink / raw
To: gentoo-commits
commit: 909ce41704c037d6e5ddc9fb68f0c8de90f8b800
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 29 02:14:44 2016 +0000
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Tue Mar 29 02:15:59 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=909ce417
dev-libs/jemalloc: version bump to jemalloc-4.1.0
Included upstream commit 33184bf69813087 as requested by developers of dev-lang/rust,
to allow system jemalloc to be used with rust.
Package-Manager: portage-2.2.26
dev-libs/jemalloc/Manifest | 1 +
.../files/jemalloc-4.1-fix_stack_corruption.patch | 70 ++++++++++++++++++++++
dev-libs/jemalloc/jemalloc-4.1.0.ebuild | 48 +++++++++++++++
3 files changed, 119 insertions(+)
diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest
index 005eea5..9a35203 100644
--- a/dev-libs/jemalloc/Manifest
+++ b/dev-libs/jemalloc/Manifest
@@ -2,3 +2,4 @@ DIST jemalloc-2.2.5.tar.bz2 224118 SHA256 efcc9636757bd7f53a0fde084c2988bfe26f28
DIST jemalloc-3.3.1.tar.bz2 252997 SHA256 35c433cc1df5cdf9eb58b7980338552fc1d7aa64f89fe5643a972ccedb7cf20a SHA512 32814e8678af4954e26c0c0a0e5d06aba8f3844205fe212c5e41929dfab6a94ff11127a9238b5c18d72749827c467ecb874b8f3a9bc161cf1afdf4ea84c58690 WHIRLPOOL 35e8948e18ea7111ae830a8245be995b35f44ed2c2f687f706ee6941c78350c2cfaabefba223c4433069de47a9f92d621feaf176ec0c728e513e5f076e5fc874
DIST jemalloc-3.6.0.tar.bz2 338964 SHA256 e16c2159dd3c81ca2dc3b5c9ef0d43e1f2f45b04548f42db12e7c12d7bdf84fe SHA512 ebe7c64558a87a735b5906d5cb7527c241664eeae7328538675a12eabe7a1004be0f8766a3bd2a78e61334b196ca7ffc0ee8b8ff59167922a35f126cd1e76e43 WHIRLPOOL d5452005951b10d9d529349481779d79361ec8d8ac1f36f4b54408b5e0184f35d79fee8378188d98f1b8e41ae13557a2cf41ab849b68856ba69f33870fe6e980
DIST jemalloc-4.0.4.tar.bz2 391483 SHA256 3fda8d8d7fcd041aa0bebbecd45c46b28873cf37bd36c56bf44961b36d0f42d0 SHA512 93be0551a80d5f5dc3a1044ef3d5f06c5ce65f3c1fd753743ee64340b841fc2d7902178774ab71eaa633f68abad44109870eb84159679fdc8ce6d93db3a53112 WHIRLPOOL c8bc1a81555b30ff519fda90bfbcfcdb6c9e370ba7478bca17058e58e08c36d20a1995ab12d5374d4edb9cdd2469748517a6f1795a24667c5f798c4c0c756a9c
+DIST jemalloc-4.1.0.tar.bz2 412900 SHA256 fad06d714f72adb4265783bc169c6d98eeb032d57ba02d87d1dcb4a2d933ec8e SHA512 12433101936a104115d8d93991b4849daf897bd39d6c28b1235215c7abc627163a70d19259fb1f2eeb0cdd66cfe889c2e40eb77dccee6debd73b1a4313d0de73 WHIRLPOOL 0305d1cc715c565749c5e9c2de396d349c0d79513da80b461324c82f880c6a070a932cea19802ac809810fe01690dcb24047914f937ddf167a990cf7b4110f0c
diff --git a/dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch b/dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch
new file mode 100644
index 0000000..f36c188
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-4.1-fix_stack_corruption.patch
@@ -0,0 +1,70 @@
+From 33184bf69813087bf1885b0993685f9d03320c69 Mon Sep 17 00:00:00 2001
+From: Dmitri Smirnov <dmitrism@microsoft.com>
+Date: Mon, 29 Feb 2016 14:30:19 -0800
+Subject: [PATCH] Fix stack corruption and uninitialized var warning
+
+Stack corruption happens in x64 bit
+
+This resolves #347.
+---
+ src/arena.c | 2 +-
+ test/unit/hash.c | 13 +++++++------
+ 2 files changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/src/arena.c b/src/arena.c
+index 99e20fd..965c0fe 100644
+--- a/src/arena.c
++++ b/src/arena.c
+@@ -2423,7 +2423,7 @@ arena_malloc_large(tsd_t *tsd, arena_t *arena, szind_t binind, bool zero)
+ uintptr_t random_offset;
+ arena_run_t *run;
+ arena_chunk_map_misc_t *miscelm;
+- UNUSED bool idump;
++ UNUSED bool idump JEMALLOC_CC_SILENCE_INIT(false);
+
+ /* Large allocation. */
+ usize = index2size(binind);
+diff --git a/test/unit/hash.c b/test/unit/hash.c
+index f50ba81..010c9d7 100644
+--- a/test/unit/hash.c
++++ b/test/unit/hash.c
+@@ -64,14 +64,15 @@ static void
+ hash_variant_verify_key(hash_variant_t variant, uint8_t *key)
+ {
+ const int hashbytes = hash_variant_bits(variant) / 8;
+- VARIABLE_ARRAY(uint8_t, hashes, hashbytes * 256);
++ const int hashes_size = hashbytes * 256;
++ VARIABLE_ARRAY(uint8_t, hashes, hashes_size);
+ VARIABLE_ARRAY(uint8_t, final, hashbytes);
+ unsigned i;
+ uint32_t computed, expected;
+
+ memset(key, 0, KEY_SIZE);
+- memset(hashes, 0, sizeof(hashes));
+- memset(final, 0, sizeof(final));
++ memset(hashes, 0, hashes_size);
++ memset(final, 0, hashbytes);
+
+ /*
+ * Hash keys of the form {0}, {0,1}, {0,1,2}, ..., {0,1,...,255} as the
+@@ -102,17 +103,17 @@ hash_variant_verify_key(hash_variant_t variant, uint8_t *key)
+ /* Hash the result array. */
+ switch (variant) {
+ case hash_variant_x86_32: {
+- uint32_t out = hash_x86_32(hashes, hashbytes*256, 0);
++ uint32_t out = hash_x86_32(hashes, hashes_size, 0);
+ memcpy(final, &out, sizeof(out));
+ break;
+ } case hash_variant_x86_128: {
+ uint64_t out[2];
+- hash_x86_128(hashes, hashbytes*256, 0, out);
++ hash_x86_128(hashes, hashes_size, 0, out);
+ memcpy(final, out, sizeof(out));
+ break;
+ } case hash_variant_x64_128: {
+ uint64_t out[2];
+- hash_x64_128(hashes, hashbytes*256, 0, out);
++ hash_x64_128(hashes, hashes_size, 0, out);
+ memcpy(final, out, sizeof(out));
+ break;
+ } default: not_reached();
diff --git a/dev-libs/jemalloc/jemalloc-4.1.0.ebuild b/dev-libs/jemalloc/jemalloc-4.1.0.ebuild
new file mode 100644
index 0000000..a03d99d
--- /dev/null
+++ b/dev-libs/jemalloc/jemalloc-4.1.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs multilib-build
+
+DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
+HOMEPAGE="http://www.canonware.com/jemalloc/"
+SRC_URI="http://www.canonware.com/download/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0/2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="debug static-libs stats"
+HTML_DOCS=( doc/jemalloc.html )
+PATCHES=( "${FILESDIR}/${PN}-3.5.1-strip-optimization.patch"
+ "${FILESDIR}/${PN}-3.5.1_fix_html_install.patch"
+ "${FILESDIR}/${PN}-4.1-fix_stack_corruption.patch"
+)
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h )
+# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE
+# but jemalloc doesn't implement them in its configure; need this here to
+# supress the warnings until automagic is removed from the eclass
+QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared"
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable debug)
+ $(use_enable stats)
+}
+
+multilib_src_install() {
+ # Copy man file which the Makefile looks for
+ cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fixup install_name, #437362
+ install_name_tool \
+ -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.1.dylib \
+ "${ED}"/usr/$(get_libdir)/libjemalloc.1.dylib || die
+ fi
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/jemalloc/, dev-libs/jemalloc/files/
@ 2016-11-01 15:23 Thomas Deutschmann
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Deutschmann @ 2016-11-01 15:23 UTC (permalink / raw
To: gentoo-commits
commit: 7565f43fc1c544625d153f510b950f9f9bf6e848
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 1 15:22:38 2016 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Nov 1 15:23:11 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7565f43f
dev-libs/jemalloc: Patch added to fix an issue with sys-apps/sandbox
Cherry picked commit c443b67561 [Link 1] which fixes an issue which
prevented any jemalloc-enabled application from running through
sys-apps/sandbox (typical use case is emerge with FEATURES=sandbox and
FEATURES=test).
Cherry picked commit 3c8c3e9e9b [Link 2] which fixes a leaked file
descriptor.
Link 1: https://github.com/jemalloc/jemalloc/commit/c443b67561891ae68d688daf5f8ce37820cdba2b
Link 2: https://github.com/jemalloc/jemalloc/commit/3c8c3e9e9b59b6e34a222816a05f0a01a68919b3
Gentoo-Bug: https://bugs.gentoo.org/592420
Package-Manager: portage-2.3.2
.../jemalloc/files/jemalloc-4.2-issue_399.patch | 26 ++++++++++
.../jemalloc/files/jemalloc-4.2-issue_443.patch | 58 ++++++++++++++++++++++
...alloc-4.2.1.ebuild => jemalloc-4.2.1-r1.ebuild} | 2 +
3 files changed, 86 insertions(+)
diff --git a/dev-libs/jemalloc/files/jemalloc-4.2-issue_399.patch b/dev-libs/jemalloc/files/jemalloc-4.2-issue_399.patch
new file mode 100644
index 00000000..da9f2d8
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-4.2-issue_399.patch
@@ -0,0 +1,26 @@
+From 3c8c3e9e9b59b6e34a222816a05f0a01a68919b3 Mon Sep 17 00:00:00 2001
+From: Jason Evans <jasone@canonware.com>
+Date: Mon, 26 Sep 2016 15:55:40 -0700
+Subject: [PATCH] Close file descriptor after reading
+ "/proc/sys/vm/overcommit_memory".
+
+This bug was introduced by c2f970c32b527660a33fa513a76d913c812dcf7c
+(Modify pages_map() to support mapping uncommitted virtual memory.).
+
+This resolves #399.
+---
+ src/pages.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pages.c b/src/pages.c
+index 2a9b7e3..05b0d69 100644
+--- a/src/pages.c
++++ b/src/pages.c
+@@ -219,6 +219,7 @@ os_overcommits_proc(void)
+ return (false); /* Error. */
+
+ nread = read(fd, &buf, sizeof(buf));
++ close(fd);
+ if (nread < 1)
+ return (false); /* Error. */
+ /*
diff --git a/dev-libs/jemalloc/files/jemalloc-4.2-issue_443.patch b/dev-libs/jemalloc/files/jemalloc-4.2-issue_443.patch
new file mode 100644
index 00000000..d2b065a
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-4.2-issue_443.patch
@@ -0,0 +1,58 @@
+From c443b67561891ae68d688daf5f8ce37820cdba2b Mon Sep 17 00:00:00 2001
+From: Jason Evans <jasone@canonware.com>
+Date: Sat, 29 Oct 2016 22:41:04 -0700
+Subject: [PATCH] Use syscall(2) rather than {open,read,close}(2) during boot.
+
+Some applications wrap various system calls, and if they call the
+allocator in their wrappers, unexpected reentry can result. This is not
+a general solution (many other syscalls are spread throughout the code),
+but this resolves a bootstrapping issue that is apparently common.
+
+This resolves #443.
+---
+ src/pages.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/src/pages.c b/src/pages.c
+index 05b0d69..84e2216 100644
+--- a/src/pages.c
++++ b/src/pages.c
+@@ -207,6 +207,11 @@ os_overcommits_sysctl(void)
+ #endif
+
+ #ifdef JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY
++/*
++ * Use syscall(2) rather than {open,read,close}(2) when possible to avoid
++ * reentry during bootstrapping if another library has interposed system call
++ * wrappers.
++ */
+ static bool
+ os_overcommits_proc(void)
+ {
+@@ -214,12 +219,26 @@ os_overcommits_proc(void)
+ char buf[1];
+ ssize_t nread;
+
++#ifdef SYS_open
++ fd = (int)syscall(SYS_open, "/proc/sys/vm/overcommit_memory", O_RDONLY);
++#else
+ fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY);
++#endif
+ if (fd == -1)
+ return (false); /* Error. */
+
++#ifdef SYS_read
++ nread = (ssize_t)syscall(SYS_read, fd, &buf, sizeof(buf));
++#else
+ nread = read(fd, &buf, sizeof(buf));
++#endif
++
++#ifdef SYS_close
++ syscall(SYS_close, fd);
++#else
+ close(fd);
++#endif
++
+ if (nread < 1)
+ return (false); /* Error. */
+ /*
diff --git a/dev-libs/jemalloc/jemalloc-4.2.1.ebuild b/dev-libs/jemalloc/jemalloc-4.2.1-r1.ebuild
similarity index 95%
rename from dev-libs/jemalloc/jemalloc-4.2.1.ebuild
rename to dev-libs/jemalloc/jemalloc-4.2.1-r1.ebuild
index 8c320ea..c7f3d8a 100644
--- a/dev-libs/jemalloc/jemalloc-4.2.1.ebuild
+++ b/dev-libs/jemalloc/jemalloc-4.2.1-r1.ebuild
@@ -17,6 +17,8 @@ IUSE="debug static-libs stats"
HTML_DOCS=( doc/jemalloc.html )
PATCHES=( "${FILESDIR}/${PN}-3.5.1-strip-optimization.patch"
"${FILESDIR}/${PN}-3.5.1_fix_html_install.patch"
+ "${FILESDIR}/${PN}-4.2-issue_399.patch"
+ "${FILESDIR}/${PN}-4.2-issue_443.patch"
)
MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h )
# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/jemalloc/, dev-libs/jemalloc/files/
@ 2019-06-11 23:48 Thomas Deutschmann
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Deutschmann @ 2019-06-11 23:48 UTC (permalink / raw
To: gentoo-commits
commit: 6b81845b54217becc46066f5269f3c07e3afaff7
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 11 23:47:05 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Jun 11 23:47:32 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b81845b
dev-libs/jemalloc: bump to v5.2.0
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
dev-libs/jemalloc/Manifest | 1 +
.../files/jemalloc-5.2.0-fix_html_install.patch | 11 ++++
dev-libs/jemalloc/jemalloc-5.2.0.ebuild | 61 ++++++++++++++++++++++
3 files changed, 73 insertions(+)
diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest
index 53502225ff4..ff71053391b 100644
--- a/dev-libs/jemalloc/Manifest
+++ b/dev-libs/jemalloc/Manifest
@@ -3,3 +3,4 @@ DIST jemalloc-4.4.0.tar.bz2 440144 BLAKE2B 6acb91c5be6c5b17c209341dd08e6973e3ad5
DIST jemalloc-4.5.0.tar.bz2 449992 BLAKE2B 6141c71f7f5f9cee91a59eeed9c69b0a69b3cc39666aa608445073c11ee3ca9b4777a851c5cb5adac80d42bfbf10a6726e5dc1340ffe85ea1ee884d87c7865da SHA512 76953363fe1007952232220afa1a91da4c1c33c02369b5ad239d8dd1d0792141197c15e8489a8f4cd301b08494e65cadd8ecd34d025cb0285700dd78d7248821
DIST jemalloc-5.0.1.tar.bz2 499300 BLAKE2B 551933fcd93315968cbf89bfadc40313717ff216141af8a131f2333d10090438ddf36fbfdc0ee831cbec6f930ae15aa9cfaafae72ed4f38dd97b00712ca918e8 SHA512 8cb5957a5724eb2bbad120cf0028ea8b2b14b4a416c1751b7c967351a7fd51135058ea0d3c4dc1d127c86f3aa7e9fd5ef101857110aabfdb7789427791c432c3
DIST jemalloc-5.1.0.tar.bz2 515622 BLAKE2B 3c8b35d30fca0018e3e32452e6fa41c7ac59f9f2f7d4bc243237fde95025ab5a7562fb86b5afe2ca9b7bb072f7baf6ac7589a4862d9ebaafddae187d93e20da0 SHA512 d9abebe54d303ca931b8c31c1033f23ff5fb060f2377ec8386f4d79c352e65c78ed34f680c352dac14f7d7115d10245782d553d988bc13df2eb34a2f0942ef6f
+DIST jemalloc-5.2.0.tar.bz2 543892 BLAKE2B 042dd32452713d0524ae8aedbd3aa96a420037ae3ff0345bbf56a7839ae6ba9e0c700034fab9d5c7b6f4cbb43e2d8199b412901afce16c2785a816d439166e6d SHA512 e3be4d534770126caf10f2684aed9fe4ba1422dd47625fe50343cfb750f26eff869fcc7d1e30a96dd6c73f6614c4bbcd560fd24fc26b55ac731c43e60fd05234
diff --git a/dev-libs/jemalloc/files/jemalloc-5.2.0-fix_html_install.patch b/dev-libs/jemalloc/files/jemalloc-5.2.0-fix_html_install.patch
new file mode 100644
index 00000000000..fe7bcb4a07b
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-5.2.0-fix_html_install.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -511,7 +511,7 @@ install_doc_man:
+ $(INSTALL) -m 644 $$d $(MANDIR)/man3; \
+ done
+
+-install_doc: build_doc install_doc_html install_doc_man
++install_doc: build_doc install_doc_man
+
+ install: install_bin install_include install_lib install_doc
+
diff --git a/dev-libs/jemalloc/jemalloc-5.2.0.ebuild b/dev-libs/jemalloc/jemalloc-5.2.0.ebuild
new file mode 100644
index 00000000000..d2b63f0d039
--- /dev/null
+++ b/dev-libs/jemalloc/jemalloc-5.2.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools toolchain-funcs multilib-minimal
+
+DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
+HOMEPAGE="http://jemalloc.net/ https://github.com/jemalloc/jemalloc"
+SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0/2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="debug hardened lazy-lock static-libs stats xmalloc"
+HTML_DOCS=( doc/jemalloc.html )
+PATCHES=( "${FILESDIR}/${PN}-5.0.1-strip-optimization.patch"
+ "${FILESDIR}/${PN}-5.2.0-fix_html_install.patch"
+)
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h )
+# autotools-utils.eclass auto-adds configure options when static-libs is in IUSE
+# but jemalloc doesn't implement them in its configure; need this here to
+# supress the warnings until automagic is removed from the eclass
+QA_CONFIGURE_OPTIONS="--enable-static --disable-static --enable-shared --disable-shared"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ if use hardened ; then
+ myconf+=( --disable-syscall )
+ fi
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable debug) \
+ $(use_enable lazy-lock) \
+ $(use_enable stats) \
+ $(use_enable xmalloc) \
+ "${myconf[@]}"
+}
+
+multilib_src_install() {
+ # Copy man file which the Makefile looks for
+ cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fixup install_name, #437362
+ install_name_tool \
+ -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.2.dylib \
+ "${ED}"/usr/$(get_libdir)/libjemalloc.2.dylib || die
+ fi
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/jemalloc/, dev-libs/jemalloc/files/
@ 2022-05-04 14:33 WANG Xuerui
0 siblings, 0 replies; 4+ messages in thread
From: WANG Xuerui @ 2022-05-04 14:33 UTC (permalink / raw
To: gentoo-commits
commit: 509cca29fe90b34bcb7dae9d507e2bb85bc8edda
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Wed May 4 09:11:57 2022 +0000
Commit: WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Wed May 4 14:31:52 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=509cca29
dev-libs/jemalloc: add 5.3.0_pre20220405
This is snapshot of https://github.com/jemalloc/jemalloc/commit/ed5fc14b28ca,
currently being tested by upstream as the 5.3.0 RC.
Tested locally on amd64 and loong, but revdeps are not tested, so dropped
all keywords for this version.
Meanwhile, bumped EAPI to 8, and removed IUSE=static-libs due to no
consumer in tree.
See: https://github.com/jemalloc/jemalloc/issues/2213
Closes: https://github.com/gentoo/gentoo/pull/25315
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
dev-libs/jemalloc/Manifest | 1 +
.../files/jemalloc-5.3.0-gentoo-fixups.patch | 43 ++++++++++++++++++
.../jemalloc/jemalloc-5.3.0_pre20220405.ebuild | 53 ++++++++++++++++++++++
3 files changed, 97 insertions(+)
diff --git a/dev-libs/jemalloc/Manifest b/dev-libs/jemalloc/Manifest
index e9979c395b76..0ba9cde236bf 100644
--- a/dev-libs/jemalloc/Manifest
+++ b/dev-libs/jemalloc/Manifest
@@ -1 +1,2 @@
DIST jemalloc-5.2.1.tar.bz2 554279 BLAKE2B 52cb8cd5e5807a750a7e5e9ee005afd61144d821d7f7029a5eca998fd61787a7271338dee3de586ddf93f5fdbddc2c2ca03ba64375a70096f273a6aa173da431 SHA512 0bbb77564d767cef0c6fe1b97b705d368ddb360d55596945aea8c3ba5889fbce10479d85ad492c91d987caacdbbdccc706aa3688e321460069f00c05814fae02
+DIST jemalloc-5.3.0_pre20220405.tar.xz 671240 BLAKE2B 75cc8b58f9ce10ad1ae61b6b0146727796585d2edfd88c100661181409591bce3ed8499bfc5ffbbfac217c9baf33f955934aac9a62190874bc070c22b7e8f18f SHA512 aeacb637c0a5bd653ad584700fd3a91717b49dba60174871047e0e72ac805c9931940b0faf2e1846e09b975799d9545e32e71e0ff5951c0dcb23cfc8680a2ce9
diff --git a/dev-libs/jemalloc/files/jemalloc-5.3.0-gentoo-fixups.patch b/dev-libs/jemalloc/files/jemalloc-5.3.0-gentoo-fixups.patch
new file mode 100644
index 000000000000..e500a63225f0
--- /dev/null
+++ b/dev-libs/jemalloc/files/jemalloc-5.3.0-gentoo-fixups.patch
@@ -0,0 +1,43 @@
+This is jemalloc-5.2.0-gentoo-fixups.patch, rebased on top of upstream commit
+https://github.com/jemalloc/jemalloc/commit/ed5fc14b28ca62a6.
+From: Jory Pratt <anarchy@gentoo.org>
+Date: Tue, 23 Apr 2019 10:04:19 -0500
+Subject: [PATCH] Don't override user cflags, disable html_doc from being
+ installed
+
+Signed-off-by: Jory Pratt <anarchy@gentoo.org>
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -603,7 +603,7 @@ install_doc_man: build_doc_man
+ $(INSTALL) -v -m 644 $$d $(MANDIR)/man3; \
+ done
+
+-install_doc: install_doc_html install_doc_man
++install_doc: install_doc_man
+
+ install: install_bin install_include install_lib
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1220,21 +1220,6 @@ if test "x$enable_debug" = "x1" ; then
+ fi
+ AC_SUBST([enable_debug])
+
+-dnl Only optimize if not debugging.
+-if test "x$enable_debug" = "x0" ; then
+- if test "x$GCC" = "xyes" ; then
+- JE_CFLAGS_ADD([-O3])
+- JE_CXXFLAGS_ADD([-O3])
+- JE_CFLAGS_ADD([-funroll-loops])
+- elif test "x$je_cv_msvc" = "xyes" ; then
+- JE_CFLAGS_ADD([-O2])
+- JE_CXXFLAGS_ADD([-O2])
+- else
+- JE_CFLAGS_ADD([-O])
+- JE_CXXFLAGS_ADD([-O])
+- fi
+-fi
+-
+ dnl Enable statistics calculation by default.
+ AC_ARG_ENABLE([stats],
+ [AS_HELP_STRING([--disable-stats],
diff --git a/dev-libs/jemalloc/jemalloc-5.3.0_pre20220405.ebuild b/dev-libs/jemalloc/jemalloc-5.3.0_pre20220405.ebuild
new file mode 100644
index 000000000000..bb8d838144a4
--- /dev/null
+++ b/dev-libs/jemalloc/jemalloc-5.3.0_pre20220405.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="Jemalloc is a general-purpose scalable concurrent allocator"
+HOMEPAGE="http://jemalloc.net/ https://github.com/jemalloc/jemalloc"
+#SRC_URI="https://github.com/jemalloc/jemalloc/releases/download/${PV}/${P}.tar.bz2"
+SRC_URI="https://dev.gentoo.org/~xen0n/distfiles/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0/2"
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+IUSE="debug lazy-lock prof stats xmalloc"
+HTML_DOCS=( doc/jemalloc.html )
+PATCHES=( "${FILESDIR}/${PN}-5.3.0-gentoo-fixups.patch" )
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/jemalloc/jemalloc.h )
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myconf=(
+ $(use_enable debug)
+ $(use_enable lazy-lock)
+ $(use_enable prof)
+ $(use_enable stats)
+ $(use_enable xmalloc)
+ )
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_install() {
+ # Copy man file which the Makefile looks for
+ cp "${S}/doc/jemalloc.3" "${BUILD_DIR}/doc" || die
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fixup install_name, #437362
+ install_name_tool \
+ -id "${EPREFIX}"/usr/$(get_libdir)/libjemalloc.2.dylib \
+ "${ED}"/usr/$(get_libdir)/libjemalloc.2.dylib || die
+ fi
+ find "${ED}" -name '*.a' -delete || die
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-04 14:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-04 14:33 [gentoo-commits] repo/gentoo:master commit in: dev-libs/jemalloc/, dev-libs/jemalloc/files/ WANG Xuerui
-- strict thread matches above, loose matches on Subject: below --
2019-06-11 23:48 Thomas Deutschmann
2016-11-01 15:23 Thomas Deutschmann
2016-03-29 2:16 Ian Stakenvicius
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox