public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libomp/, sys-libs/libomp/files/
Date: Tue, 18 Oct 2016 16:59:40 +0000 (UTC)	[thread overview]
Message-ID: <1476809978.2b24f61af9fea06bfbc34d4f8e381d00b38853cd.mgorny@gentoo> (raw)

commit:     2b24f61af9fea06bfbc34d4f8e381d00b38853cd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 18 16:57:25 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct 18 16:59:38 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b24f61a

sys-libs/libomp: Backport upstream musl fix by Lei Zhang

Closes: https://github.com/gentoo/gentoo/pull/2118

 .../files/libomp-3.9.0-musl-strerror_r.patch       | 35 ++++++++++++++++++++++
 sys-libs/libomp/libomp-3.9.0.ebuild                |  2 ++
 2 files changed, 37 insertions(+)

diff --git a/sys-libs/libomp/files/libomp-3.9.0-musl-strerror_r.patch b/sys-libs/libomp/files/libomp-3.9.0-musl-strerror_r.patch
new file mode 100644
index 00000000..4fbf9f6
--- /dev/null
+++ b/sys-libs/libomp/files/libomp-3.9.0-musl-strerror_r.patch
@@ -0,0 +1,35 @@
+From 4fa7d5e207a4f7ef79b423b7d9658b7625795f5c Mon Sep 17 00:00:00 2001
+From: Michal Gorny <mgorny@gentoo.org>
+Date: Tue, 18 Oct 2016 16:38:44 +0000
+Subject: [PATCH] Fix a compile error on musl-libc due to strerror_r()
+ prototype
+
+Function strerror_r() has different signatures in different
+implementations of libc: glibc's version returns a char*, while BSDs
+and musl return a int. libomp unconditionally assumes glibc on Linux
+and thus fails to compile against musl-libc. This patch addresses this
+issue.
+
+Differential Revision: https://reviews.llvm.org/D25071
+
+git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@284492 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ runtime/src/kmp_i18n.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/runtime/src/kmp_i18n.c b/runtime/src/kmp_i18n.c
+index 546e693..e008d1f 100644
+--- a/runtime/src/kmp_i18n.c
++++ b/runtime/src/kmp_i18n.c
+@@ -809,7 +809,7 @@ sys_error(
+                 int    strerror_r( int, char *, size_t );  // XSI version
+         */
+ 
+-        #if KMP_OS_LINUX
++        #if defined(__GLIBC__) && defined(_GNU_SOURCE)
+ 
+             // GNU version of strerror_r.
+ 
+-- 
+2.10.1
+

diff --git a/sys-libs/libomp/libomp-3.9.0.ebuild b/sys-libs/libomp/libomp-3.9.0.ebuild
index ed972e8..dad6963 100644
--- a/sys-libs/libomp/libomp-3.9.0.ebuild
+++ b/sys-libs/libomp/libomp-3.9.0.ebuild
@@ -27,6 +27,8 @@ S="${WORKDIR}/${MY_P}.src"
 PATCHES=(
 	# backport of https://reviews.llvm.org/D24563
 	"${FILESDIR}"/${PN}-3.9.0-optional-aliases.patch
+	# backport of https://reviews.llvm.org/D25071
+	"${FILESDIR}"/${PN}-3.9.0-musl-strerror_r.patch
 )
 
 multilib_src_configure() {


             reply	other threads:[~2016-10-18 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 16:59 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-04-04 12:01 [gentoo-commits] repo/gentoo:master commit in: sys-libs/libomp/, sys-libs/libomp/files/ Michał Górny

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=1476809978.2b24f61af9fea06bfbc34d4f8e381d00b38853cd.mgorny@gentoo \
    --to=mgorny@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