summaryrefslogtreecommitdiff
path: root/dev-util/google-perftools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-27 22:41:01 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-27 22:41:01 +0100
commitf660c6de84558324d784218831d8f0782ee41e2e (patch)
treec1f2aa79617d0ceaaff49d71603abc386aae2c37 /dev-util/google-perftools
parent95461df035e3867364495f065e5e805bf629b2d7 (diff)
gentoo resync : 27.10.2021
Diffstat (limited to 'dev-util/google-perftools')
-rw-r--r--dev-util/google-perftools/Manifest5
-rw-r--r--dev-util/google-perftools/files/google-perftools-2.9.1-disable-generic-dynamic-tls.patch34
-rw-r--r--dev-util/google-perftools/google-perftools-2.8.ebuild94
-rw-r--r--dev-util/google-perftools/google-perftools-2.9.1-r2.ebuild (renamed from dev-util/google-perftools/google-perftools-2.9.1.ebuild)55
4 files changed, 74 insertions, 114 deletions
diff --git a/dev-util/google-perftools/Manifest b/dev-util/google-perftools/Manifest
index 96ae1134c3ff..1dc955f9a6bc 100644
--- a/dev-util/google-perftools/Manifest
+++ b/dev-util/google-perftools/Manifest
@@ -1,9 +1,8 @@
AUX 2.8-musl-tests.patch 1068 BLAKE2B 804671d01cba50821e63d60dd54154506be03fa8aa4a5ea5d3fccc1c7e1f7550e4f30f6792051f8ce7c47c8cedbbe54df0324060a9f0b306383a288c95667ed2 SHA512 f16c2fe9406c4865887ba1698eada2151e27b47a3cc73a6d3a8c3ca769102ca064f141e0137e168a8c2613dd4f663a5c7a3a7128d51d03fd9889835f0bc217a8
AUX fix_ppc64el_FTBFS.patch 1305 BLAKE2B 9f20c5e91a47f3c88c15990d4ae77c423aa7832f7b95bfc66686751f9f2d8b9eef4ef6b7d73f7fe9296d5d04a154b0330f71000065f03412b440c010d44439e6 SHA512 d1a3f447037c4b7408fa20710989b262d37072c4e0552b74e3e25b673f3da4cb0280bbdccfe2e1c97eeb0b318b3923ad9a3d9afab17ba067e7b6755f33ad4f1d
+AUX google-perftools-2.9.1-disable-generic-dynamic-tls.patch 1429 BLAKE2B 69dfc7f24fe7d765f4ad6e118ff4b78de070bd471a92ab19bf7349addfc8ce477e14513bada0168fce675aac75e413d26319a784f0ecd5fbfc7e4750b4b1a35e SHA512 a85a631761df4e5a0d38f2e1ce9cb48f3299bb83f7b73cefe872d31f2cf08ec0fffe2c5918dd6e769d83a726404bf94c72857a3870a8823d4dea12d686a4bbd8
DIST gperftools-2.7.tar.gz 916854 BLAKE2B d14c2b88f2986d3691d7184e1759de2066ca50224f745a6291ab2ebd5f7f985dec4916a1c01d61142eca9b64f3742c50b82e64118602afaa7b27ae2d94a4ed4d SHA512 4a8e72b960218b0615281b830b3f1a4a1b27830006c45ed68b1ffd152bb50a8b3beec850526e330e2ad08c28774bdc01dade9bcc3e7c9e26d30823cc55648d77
-DIST gperftools-2.8.tar.gz 928379 BLAKE2B e94bac4153cb5d3170d6486a9065b56d631ab261d25b4a5a150f04f87f767c203508839daf400dbe06dc82e9e3da2988e4b4c74725c6be836fa9c70ed0576209 SHA512 c959ffa2b36ecfea10927b40b6dd668385cff7eab3c4bc2d7c5aed5f4de87ce8e4f9b30ab44652a0288badbb6c5aa7110c491b13c4030fb656609c2eb25918a8
DIST gperftools-2.9.1.tar.gz 924910 BLAKE2B fcf0491e42ff4212a63ab0af422f27f5a625c53a0b33e69f8dede96b004a0f01af104d9791a4b75d38145ae0059f5e2967ea1d09b0712cc4d930ef7aafd4f3ba SHA512 5e07f28da9afc5f1ba3df7f06ad0e146c171d33e1779bbaab21547ed234aaced02e5278c1eb8f92fc45480abd2474d6a2d4c71644fb9378f41088c56cc1bc8ab
EBUILD google-perftools-2.7-r1.ebuild 2410 BLAKE2B 24f3d8e35ac243ed10d1be42498845a4c462158b56faa4a6c8ae3e18cf4d4ae4c326561d2407e702f9777d39e03b1b889efbf960c3ca64acf0cc118d735f5775 SHA512 fbb6a745414d0fc606a560cd86a9acb60f3b504a3c19128c26e96c8fab67b9ddd6b7138edbfd680f46d8e25662c7eb0c89cc07079a09f2bec1a2f0ae4feef11a
-EBUILD google-perftools-2.8.ebuild 2458 BLAKE2B 54871c3ba0c08bb28b18ee0aab24fca1ad455358d172f738cfee926c7290066b06ab2dc5f08c409eaa86d4b48345a2b4baa6b2db0168ca401185ba6427882bec SHA512 ba816192037a1a8bfad8b1d295fefd29da93ea06e4361c52227b120371d9cb0b5ec9da3f4861671f7ec8335c2811b058b77878553acb98dd7c8bc2d34f995c43
-EBUILD google-perftools-2.9.1.ebuild 2629 BLAKE2B 5a8dc4b054da9a8a1e307885b9c0f3ec5cbb892f919d522f72a283a6c08a383f70ce7ab55767bdfdcc0ec633f7a30daf19c31910aa7f3a9ef4053ffd4ffb0c15 SHA512 fac26ac94e1dfa3c2566236b31f2f452bd051fa40feb2ab0c3d950cacb281175eed1847c1865250fdb78ae25f8f9998c13889239857e4f23c9e0bb9de0d9d29c
+EBUILD google-perftools-2.9.1-r2.ebuild 3144 BLAKE2B 6bf0cfe293302e4acd2ef907fc681889e31a601b9a510ade4758b1763cc28f612dab47c5d3fd34bdbb88a171d893aa3a642c8856c6587657c5eba4859c6d943c SHA512 97ed14e881a30f9234f7e90bbcbe11b14fdde5e3a2f81dfff95b0d4714362966866c232ba62764121121510b78cf2825f165d3baa8e2339170b169fac284d049
MISC metadata.xml 1129 BLAKE2B 441935f9605b2c11fb02f4698375b87cdf7a30596f36c5d069ef3bec2599181bc91321b0bbea21f0841d2abdcca58aa1a4732d486bc5719b90f4eb6558fc2404 SHA512 624d8b8fcf555aa62b57c32443eef40fa350ffe346f84dadb33bcb8c8dc192749deee2ca01e121ac82d4e349bcc179af0f897a4b6b696741aefe01ce79abe916
diff --git a/dev-util/google-perftools/files/google-perftools-2.9.1-disable-generic-dynamic-tls.patch b/dev-util/google-perftools/files/google-perftools-2.9.1-disable-generic-dynamic-tls.patch
new file mode 100644
index 000000000000..8e72c6dcd0a5
--- /dev/null
+++ b/dev-util/google-perftools/files/google-perftools-2.9.1-disable-generic-dynamic-tls.patch
@@ -0,0 +1,34 @@
+Grabbed from Fedora: https://src.fedoraproject.org/rpms/gperftools/blob/rawhide/f/gperftools-2.7.90-disable-generic-dynamic-tls.patch
+
+Allows consumers to work correctly on arm64.
+--- a/configure.ac
++++ b/configure.ac
+@@ -665,6 +665,17 @@ AS_IF([test "x$enable_aggressive_decommi
+ 1,
+ [enable aggressive decommit by default])])
+
++# Enable generic dynamic TLS model by default
++default_enable_generic_dynamic_tls=yes
++AC_ARG_ENABLE([general-dynamic-tls],
++ [AS_HELP_STRING([--disable-general-dynamic-tls],
++ [Do not use the general dynamic TLS model])],
++ [],
++ [enable_generic_dynamic_tls="$default_enable_generic_dynamic_tls"])
++AS_IF([test "x$enable_generic_dynamic_tls" = xyes],
++ [AC_DEFINE([ENABLE_GENERIC_DYNAMIC_TLS], 1,
++ [Use the generic dynamic TLS model])])
++
+ # Write generated configuration file
+ AC_CONFIG_FILES([Makefile
+ src/gperftools/tcmalloc.h src/windows/gperftools/tcmalloc.h])
+--- a/src/base/basictypes.h
++++ b/src/base/basictypes.h
+@@ -200,7 +200,7 @@ struct CompileAssert {
+ # define ATTRIBUTE_UNUSED
+ #endif
+
+-#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS)
++#if defined(HAVE___ATTRIBUTE__) && defined(HAVE_TLS) && defined(ENABLE_GENERIC_DYNAMIC_TLS)
+ #define ATTR_INITIAL_EXEC __attribute__ ((tls_model ("initial-exec")))
+ #else
+ #define ATTR_INITIAL_EXEC
diff --git a/dev-util/google-perftools/google-perftools-2.8.ebuild b/dev-util/google-perftools/google-perftools-2.8.ebuild
deleted file mode 100644
index b5cb254c7978..000000000000
--- a/dev-util/google-perftools/google-perftools-2.8.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-MY_P="gperftools-${PV}"
-
-inherit toolchain-funcs flag-o-matic autotools vcs-snapshot multilib-minimal
-
-DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools"
-HOMEPAGE="https://github.com/gperftools/gperftools"
-SRC_URI="https://github.com/gperftools/gperftools/archive/${MY_P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0/4"
-# contains ASM code, with support for
-# freebsd x86/amd64
-# linux x86/amd64/ppc/ppc64/arm
-# OSX ppc/amd64
-# AIX ppc/ppc64
-KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
-
-IUSE="largepages largepages64k +debug minimal optimisememory test static-libs"
-
-RESTRICT="!test? ( test )"
-
-DEPEND="!ppc64? ( sys-libs/libunwind )"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/${PV}-musl-tests.patch"
-)
-
-pkg_setup() {
- # set up the make options in here so that we can actually make use
- # of them on both compile and install.
-
- # Avoid building the unit testing if we're not going to execute
- # tests; this trick here allows us to ignore the tests without
- # touching the build system (and thus without rebuilding
- # autotools). Keep commented as long as it's restricted.
- use test || \
- MAKEOPTS+=" noinst_PROGRAMS= "
-}
-
-src_prepare() {
- default
- eautoreconf
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- use largepages && append-cppflags -DTCMALLOC_LARGE_PAGES
- use largepages64k && append-cppflags -DTCMALLOC_LARGE_PAGES64K
- use optimisememory && append-cppflags -DTCMALLOC_SMALL_BUT_SLOW
- append-flags -fno-strict-aliasing -fno-omit-frame-pointer
-
- econf \
- --enable-shared \
- $(use_enable static-libs static) \
- $(use_enable debug debugalloc) \
- $(if [[ ${ABI} == x32 ]]; then printf "--enable-minimal\n" else use_enable minimal; fi)
-}
-
-src_test() {
- case "${LD_PRELOAD}" in
- *libsandbox*)
- ewarn "Unable to run tests when sandbox is enabled."
- ewarn "See https://bugs.gentoo.org/290249"
- return 0
- ;;
- esac
-
- multilib-minimal_src_test
-}
-
-src_install() {
- if ! use minimal && has x32 ${MULTILIB_ABIS}; then
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/gperftools/heap-checker.h
- /usr/include/gperftools/heap-profiler.h
- /usr/include/gperftools/stacktrace.h
- /usr/include/gperftools/profiler.h
- )
- fi
-
- multilib-minimal_src_install
-}
-
-multilib_src_install_all() {
- einstalldocs
- use static-libs || find "${D}" -name '*.la' -delete || die
-}
diff --git a/dev-util/google-perftools/google-perftools-2.9.1.ebuild b/dev-util/google-perftools/google-perftools-2.9.1-r2.ebuild
index 896b51dfd9c8..0ac7aaf851de 100644
--- a/dev-util/google-perftools/google-perftools-2.9.1.ebuild
+++ b/dev-util/google-perftools/google-perftools-2.9.1-r2.ebuild
@@ -2,9 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-MY_P="gperftools-${PV}"
-inherit toolchain-funcs flag-o-matic autotools vcs-snapshot multilib-minimal
+MY_P="gperftools-${PV}"
+inherit flag-o-matic autotools vcs-snapshot multilib-minimal
DESCRIPTION="Fast, multi-threaded malloc() and nifty performance analysis tools"
HOMEPAGE="https://github.com/gperftools/gperftools"
@@ -26,13 +26,19 @@ RESTRICT="!test? ( test )"
# TODO: remove the riscv special case once either libunwind has begun supporting this arch
# or this package allows using llvm-libunwind for other arches
DEPEND="!ppc64? (
- riscv? ( sys-libs/llvm-libunwind )
- !riscv? ( sys-libs/libunwind )
+ riscv? ( sys-libs/llvm-libunwind:= )
+ !riscv? ( sys-libs/libunwind:= )
)"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ # Please keep this if possible on bumps, check Fedora if needs rebasing
+ # Allows correct functionality on e.g. arm64, bug #818871
+ "${FILESDIR}"/${PN}-2.9.1-disable-generic-dynamic-tls.patch
+)
+
pkg_setup() {
# set up the make options in here so that we can actually make use
# of them on both compile and install.
@@ -47,6 +53,7 @@ pkg_setup() {
src_prepare() {
default
+
eautoreconf
multilib_copy_sources
}
@@ -57,21 +64,34 @@ multilib_src_configure() {
use optimisememory && append-cppflags -DTCMALLOC_SMALL_BUT_SLOW
append-flags -fno-strict-aliasing -fno-omit-frame-pointer
- econf \
- --enable-shared \
- $(use_enable static-libs static) \
- $(use_enable debug debugalloc) \
- $(if [[ ${ABI} == x32 ]]; then printf "--enable-minimal\n" else use_enable minimal; fi)
+ local myeconfargs=(
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable debug debugalloc)
+ )
+
+ if [[ ${ABI} == x32 ]]; then
+ myeconfargs+=( --enable-minimal )
+ else
+ myeconfargs+=( $(use_enable minimal) )
+ fi
+
+ if use arm64 || use s390; then
+ # Use the same arches for disabling TLS (thread local storage)
+ # as Fedora, but we might need to expand this list if we get
+ # more odd segfaults in consumers like in bug #818871.
+ myeconfargs+=( --disable-general-dynamic-tls )
+ fi
+
+ econf "${myeconfargs[@]}"
}
src_test() {
- case "${LD_PRELOAD}" in
- *libsandbox*)
- ewarn "Unable to run tests when sandbox is enabled."
- ewarn "See https://bugs.gentoo.org/290249"
- return 0
- ;;
- esac
+ if has sandbox ${FEATURES}; then
+ ewarn "Unable to run tests when sandbox is enabled."
+ ewarn "See https://bugs.gentoo.org/290249"
+ return 0
+ fi
multilib-minimal_src_test
}
@@ -91,5 +111,6 @@ src_install() {
multilib_src_install_all() {
einstalldocs
- use static-libs || find "${D}" -name '*.la' -delete || die
+
+ use static-libs || find "${ED}" -name '*.la' -delete || die
}