From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/link-grammar/, dev-libs/link-grammar/files/
Date: Sun, 7 May 2023 18:36:21 +0000 (UTC) [thread overview]
Message-ID: <1683484520.e654b5e511fa528838ce055239a7a6f9f704b339.soap@gentoo> (raw)
commit: e654b5e511fa528838ce055239a7a6f9f704b339
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun May 7 18:35:20 2023 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun May 7 18:35:20 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e654b5e5
dev-libs/link-grammar: add upstreamed patch
Closes: https://bugs.gentoo.org/903749
Signed-off-by: David Seifert <soap <AT> gentoo.org>
...mar-5.12.3-Wimplicit-function-declaration.patch | 35 ++++++++++++++++++++++
dev-libs/link-grammar/link-grammar-5.12.3.ebuild | 5 ++++
2 files changed, 40 insertions(+)
diff --git a/dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch b/dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch
new file mode 100644
index 000000000000..55ca89c09b94
--- /dev/null
+++ b/dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch
@@ -0,0 +1,35 @@
+From 3cbc9ddfd4c3a3e407338619fa383d24da05b23d Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Sun, 7 May 2023 16:02:23 +0200
+Subject: [PATCH] Use correct guard macro for glibc heap functions
+
+* `__GNUC__` == Compiling with `-std=gnu*`
+* `__GLIBC__` == Compiling against glibc
+
+Bug: https://bugs.gentoo.org/903749
+---
+ link-grammar/parse/extract-links.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/link-grammar/parse/extract-links.c b/link-grammar/parse/extract-links.c
+index a6129ac7a..e2ce266bc 100644
+--- a/link-grammar/parse/extract-links.c
++++ b/link-grammar/parse/extract-links.c
+@@ -278,7 +278,7 @@ void free_extractor(extractor_t * pex)
+ pex->x_table_size = 0;
+ pex->x_table = NULL;
+
+-#if defined __GNUC__
++#if defined __GLIBC__
+ // MST parsing can result in pathological cases, with almost a
+ // billion elts in the Parse_choice_pool. This blows up the
+ // resident-set size (RSS) over time. Avoid this issue by trimming.
+@@ -294,7 +294,7 @@ void free_extractor(extractor_t * pex)
+
+ xfree((void *) pex, sizeof(extractor_t));
+
+-#if defined __GNUC__
++#if defined __GLIBC__
+ // malloc_trim() is a gnu extension. An alternative would be
+ // to call madvise(MADV_DONTNEED) but this is more complicated.
+ if (trim) malloc_trim(0);
diff --git a/dev-libs/link-grammar/link-grammar-5.12.3.ebuild b/dev-libs/link-grammar/link-grammar-5.12.3.ebuild
index 8aa2ad28347d..ad2d6ce3d75f 100644
--- a/dev-libs/link-grammar/link-grammar-5.12.3.ebuild
+++ b/dev-libs/link-grammar/link-grammar-5.12.3.ebuild
@@ -31,6 +31,11 @@ BDEPEND="
sys-devel/autoconf-archive
virtual/pkgconfig"
+PATCHES=(
+ # upstreamed (https://github.com/opencog/link-grammar/pull/1471)
+ "${FILESDIR}"/${P}-Wimplicit-function-declaration.patch
+)
+
pkg_setup() {
if use aspell && use hunspell; then
ewarn "You have enabled 'aspell' and 'hunspell' support, but both cannot coexist,"
next reply other threads:[~2023-05-07 18:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-07 18:36 David Seifert [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-11-13 17:12 [gentoo-commits] repo/gentoo:master commit in: dev-libs/link-grammar/, dev-libs/link-grammar/files/ David Seifert
2022-03-19 17:10 David Seifert
2021-04-19 9:48 David Seifert
2020-09-28 19:50 Michał Górny
2020-08-16 11:46 David Seifert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1683484520.e654b5e511fa528838ce055239a7a6f9f704b339.soap@gentoo \
--to=soap@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox