Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-libs/libomp/, sys-libs/libomp/files/
Date: Tue, 04 Apr 2017 03:16:01
Message-Id: 1491275716.7cf428ec804bd740d67df06f778124ee2d10e492.lluixhi@gentoo
1 commit: 7cf428ec804bd740d67df06f778124ee2d10e492
2 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
3 AuthorDate: Tue Apr 4 03:15:16 2017 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Tue Apr 4 03:15:16 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7cf428ec
7
8 sys-libs/libomp: restore 3.9.1
9
10 Now marked stable
11
12 sys-libs/libomp/Manifest | 5 ++
13 .../files/libomp-3.9.0-musl-strerror_r.patch | 35 ++++++++++++
14 .../files/libomp-3.9.0-optional-aliases.patch | 63 ++++++++++++++++++++++
15 .../files/libomp-3.9.0-use-va_copy-macro.patch | 12 +++++
16 sys-libs/libomp/libomp-3.9.1.ebuild | 50 +++++++++++++++++
17 5 files changed, 165 insertions(+)
18
19 diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
20 index db06af9..66d96b2 100644
21 --- a/sys-libs/libomp/Manifest
22 +++ b/sys-libs/libomp/Manifest
23 @@ -1,5 +1,10 @@
24 AUX 4.0.0/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch 3456 SHA256 c88bbb1d1c81b69bcece498ae8d4861bd6cbca465d294a9a681796ce5eed96f1 SHA512 677d6d7e316d6df028ebed606cde1a4225ed6e06bacbe81cd527acf57c705858ab5aed2f71946c2404336033bfa985dafee2d56423204a59954a80424ca856e0 WHIRLPOOL cdea0f06b3436f48c1860da75e4c887c08ad031d938f080f1da7d334d73adbb0ae44ed56c94950f3665fb08d680046484f09277101093fbaa1483b5e29679b25
25 +AUX libomp-3.9.0-musl-strerror_r.patch 1159 SHA256 b1aa6d44d4d613cb1383975831ad49ccf433de5e6ff80fec1686ec161edf3ee7 SHA512 f35c5b9b1acf3cc636b505b8935a974796080fa71d96aee46e4edb559a5c5c03bf95457b27e1f026b4330a052654de539d556c4098f1b4a02cd2f95740bc3a4f WHIRLPOOL debde3f0265408f1a5c1376fcf4b84d6c210b9a8824343e22f86fdd8e1485ac20c2d8668e04ee692f14c8d8a7a13b1eaf0b117fde4565f21cc80aada9f498bb0
26 +AUX libomp-3.9.0-optional-aliases.patch 2536 SHA256 31c143bdb761a969888348ced721f22be7af7413da0b5238642a75efd8c2fcd7 SHA512 0cf501decca0997ee84754bc6c5b3401dbf408571dc169bbfd3fe892f6d0c730785a1bb4293e55eb47f8e808707810e22fac15702853a06cd7531d7a37c54265 WHIRLPOOL fa722bd91c74307217d7c419a27d6d6a55730bcd144a5e2630c0ab48a974b9ce4686e1a2dc82da735dec525f8ad5c96885a5c27b900cc5ce0057a32c146ef414
27 +AUX libomp-3.9.0-use-va_copy-macro.patch 665 SHA256 1f6df759676fb048c9e46da328f0068dd6ad448fbbb22ecf0f5a9a8873a411ed SHA512 b02c23725a9f45320f2978f180cb815b92a0b64be4fc3b5ea019fae76c789d572f01cc79399383504b6c4fed3d2b8be059311013b23e26dc63640fa8e3408430 WHIRLPOOL 45b13ca42cf92d1b5ae38e2846247817e8751eaa1fe093c50f4c8b9477c3a57bb51ef6ea1e8869c2f56b836ffd6274c75b10f1dada91a6548d93de05ad1c5458
28 AUX libomp-4.0.0-use-va_copy-macro.patch 689 SHA256 ab1d7bbb5d2cac529b43eea8e068625b169d7aa1f00c072169fc4c29cbdbe8c2 SHA512 ff1f2983c9ff0a8d8bccb937f8489d368a7de2cd5937b99f9a0c1b8f13331e93b910839ff42bf0384ad43b2c5322f6f9401243ef8828ab483fd429442bf7f149 WHIRLPOOL af1232aa25622e0c36a9f8eae53484a69e88995d079a6139701fc0b34f3debe7f555668cd88d936473009887a46b666f8a73b6369ec1bbad075ecdadb3af4495
29 +DIST openmp-3.9.1.src.tar.xz 2031588 SHA256 d23b324e422c0d5f3d64bae5f550ff1132c37a070e43c7ca93991676c86c7766 SHA512 80924a6f9765f634d24d7b0aa036d92c912dbd8e067487a14bdd03b4c587fdfc92e83eb29926bfa637ef45be3f133a924f77ab12099ea3706c18e9c42774708b WHIRLPOOL b6ec75d4f9d2b86bb8e2927791cb46e61ff8657fc21f9e0ba9893d81d3382522aca330564f3156c1fbbf765de0499e875e41e11199abe2da8ed1bef057d5e8d8
30 DIST openmp-4.0.0.src.tar.xz 2040104 SHA256 db55d85a7bb289804dc42fc5c8e35ca24dfc3885782261b675a194fd7e206e26 SHA512 3f17014a81dbaa7e8d1d0e5c0493d6cdec7ffce3f43a08ec010312ab5dfbd706d194a8fea24b9a38003b18a0824ee16f39fa72cabe22ad995773f278d27ad8f8 WHIRLPOOL cec645575370ce728546c39f999e01dd353e8f4d241ab3b920a56f71421b7ea0d288c7e7ccea54ea62a777d96d3c56725e2d2bd509a6f933ff49a37dfcfbb59f
31 +EBUILD libomp-3.9.1.ebuild 1375 SHA256 57c543884575e8370de4257784a419222a99cc93f03deab86ef513c5cb21c7d3 SHA512 d95aa3e0da00843d61c2edb8d840cba377421a768cddffb760f3d2acb1be14892d8fd72e938e1af3cef6b83cc9b445825662ddf92e1705701cd7028a22265ab7 WHIRLPOOL aabd36b3e9c03aa9297e5a019b51586d59622e6cb1e5c4137bc122084cabe226c3464d06c5fbe57844be680905143626f9cf83e971948f489cc9db7d809b2ae7
32 EBUILD libomp-4.0.0.ebuild 2010 SHA256 047dc3367a12d6bcde5e2752b125e6577062ea83eb0d5c5c23b15b555b1f5e2d SHA512 f0d9a98b5479ba5c393b42935fddc6ae8574dfc14dd7bccf07f4c5d74abacfc81d137f006e4340edc8f41ef83798330f581d6e45299f41c403d252134fc7f0de WHIRLPOOL daabf79677739fd16d8a02b17b5d041e1d54eeded96616807f91d25bdc3572ea2d91ea30ae4485a51480a34bbdce46f1a92702d7fb76d92d967fce5cea5a33b2
33 MISC metadata.xml 670 SHA256 c32e97e9d85d756302a38aac03d55a14d3e5b43cc910f1dff35b9f0c8bea03b1 SHA512 d4269bb7192e00feed26327bb2ac36db3b1c4f5d55417c22efb9a64fa5a006c17dd39459ecc305e8a9a3a954271ad10013fe5c9159a30ea609513aabddebf485 WHIRLPOOL d0022a64d2cad055eab1c6921cdfd4372fcf9cabd40c5ba7bf74d49eaff5f3498545fe29bbfc20bbee2cc3fed596e6a4d9f408d912f39900bbfb1c6c4aabb61a
34
35 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
36 new file mode 100644
37 index 0000000..4fbf9f6
38 --- /dev/null
39 +++ b/sys-libs/libomp/files/libomp-3.9.0-musl-strerror_r.patch
40 @@ -0,0 +1,35 @@
41 +From 4fa7d5e207a4f7ef79b423b7d9658b7625795f5c Mon Sep 17 00:00:00 2001
42 +From: Michal Gorny <mgorny@g.o>
43 +Date: Tue, 18 Oct 2016 16:38:44 +0000
44 +Subject: [PATCH] Fix a compile error on musl-libc due to strerror_r()
45 + prototype
46 +
47 +Function strerror_r() has different signatures in different
48 +implementations of libc: glibc's version returns a char*, while BSDs
49 +and musl return a int. libomp unconditionally assumes glibc on Linux
50 +and thus fails to compile against musl-libc. This patch addresses this
51 +issue.
52 +
53 +Differential Revision: https://reviews.llvm.org/D25071
54 +
55 +git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@284492 91177308-0d34-0410-b5e6-96231b3b80d8
56 +---
57 + runtime/src/kmp_i18n.c | 2 +-
58 + 1 file changed, 1 insertion(+), 1 deletion(-)
59 +
60 +diff --git a/runtime/src/kmp_i18n.c b/runtime/src/kmp_i18n.c
61 +index 546e693..e008d1f 100644
62 +--- a/runtime/src/kmp_i18n.c
63 ++++ b/runtime/src/kmp_i18n.c
64 +@@ -809,7 +809,7 @@ sys_error(
65 + int strerror_r( int, char *, size_t ); // XSI version
66 + */
67 +
68 +- #if KMP_OS_LINUX
69 ++ #if defined(__GLIBC__) && defined(_GNU_SOURCE)
70 +
71 + // GNU version of strerror_r.
72 +
73 +--
74 +2.10.1
75 +
76
77 diff --git a/sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch b/sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch
78 new file mode 100644
79 index 0000000..faf5bb5
80 --- /dev/null
81 +++ b/sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch
82 @@ -0,0 +1,63 @@
83 +From 89ab78e360b7b20ebe1bc89736880a8e4aaa9e6e Mon Sep 17 00:00:00 2001
84 +From: Michal Gorny <mgorny@g.o>
85 +Date: Wed, 14 Sep 2016 17:46:27 +0000
86 +Subject: [PATCH] [cmake] Make libgomp & libiomp5 alias install optional
87 +
88 +Introduce a new LIBOMP_INSTALL_VARIABLES cache variable that can be used
89 +to disable creating libgomp and libiomp5 aliases on 'make install'.
90 +Those aliases are undesired e.g. on Gentoo systems where libomp is used
91 +purely by clang.
92 +
93 +Differential Revision: https://reviews.llvm.org/D24563
94 +
95 +git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281512 91177308-0d34-0410-b5e6-96231b3b80d8
96 +---
97 + runtime/CMakeLists.txt | 4 ++++
98 + runtime/src/CMakeLists.txt | 16 +++++++++-------
99 + 2 files changed, 13 insertions(+), 7 deletions(-)
100 +
101 +diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
102 +index 9db058b..e8e9a74 100644
103 +--- a/runtime/CMakeLists.txt
104 ++++ b/runtime/CMakeLists.txt
105 +@@ -340,6 +340,10 @@ endif()
106 +
107 + set(LIBOMP_LIB_FILE ${LIBOMP_LIB_NAME}${LIBOMP_LIBRARY_SUFFIX})
108 +
109 ++# Optional backwards compatibility aliases.
110 ++set(LIBOMP_INSTALL_ALIASES TRUE CACHE BOOL
111 ++ "Install libgomp and libiomp5 library aliases for backwards compatibility")
112 ++
113 + # Print configuration after all variables are set.
114 + if(${LIBOMP_STANDALONE_BUILD})
115 + libomp_say("Operating System -- ${CMAKE_SYSTEM_NAME}")
116 +diff --git a/runtime/src/CMakeLists.txt b/runtime/src/CMakeLists.txt
117 +index 777434d..c80f88d 100644
118 +--- a/runtime/src/CMakeLists.txt
119 ++++ b/runtime/src/CMakeLists.txt
120 +@@ -305,13 +305,15 @@ else()
121 +
122 + install(TARGETS omp ${LIBOMP_INSTALL_KIND} DESTINATION lib${LIBOMP_LIBDIR_SUFFIX})
123 +
124 +- # Create aliases (symlinks) of the library for backwards compatibility
125 +- set(LIBOMP_ALIASES "libgomp;libiomp5")
126 +- foreach(alias IN LISTS LIBOMP_ALIASES)
127 +- install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\"
128 +- \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY
129 +- \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})")
130 +- endforeach()
131 ++ if(${LIBOMP_INSTALL_ALIASES})
132 ++ # Create aliases (symlinks) of the library for backwards compatibility
133 ++ set(LIBOMP_ALIASES "libgomp;libiomp5")
134 ++ foreach(alias IN LISTS LIBOMP_ALIASES)
135 ++ install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\"
136 ++ \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY
137 ++ \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})")
138 ++ endforeach()
139 ++ endif()
140 + endif()
141 + install(
142 + FILES
143 +--
144 +2.4.10
145 +
146
147 diff --git a/sys-libs/libomp/files/libomp-3.9.0-use-va_copy-macro.patch b/sys-libs/libomp/files/libomp-3.9.0-use-va_copy-macro.patch
148 new file mode 100644
149 index 0000000..ae7cf6a
150 --- /dev/null
151 +++ b/sys-libs/libomp/files/libomp-3.9.0-use-va_copy-macro.patch
152 @@ -0,0 +1,12 @@
153 +diff -Naur openmp-3.9.0.orig/runtime/src/kmp_str.c openmp-3.9.0/runtime/src/kmp_str.c
154 +--- openmp-3.9.0.orig/runtime/src/kmp_str.c 2016-11-01 12:48:23.089878111 -0700
155 ++++ openmp-3.9.0/runtime/src/kmp_str.c 2016-11-01 12:49:43.043419074 -0700
156 +@@ -208,7 +208,7 @@
157 +
158 + #if ! KMP_OS_WINDOWS
159 + va_list _args;
160 +- __va_copy( _args, args ); // Make copy of args.
161 ++ va_copy( _args, args ); // Make copy of args.
162 + #define args _args // Substitute args with its copy, _args.
163 + #endif // KMP_OS_WINDOWS
164 + rc = KMP_VSNPRINTF( buffer->str + buffer->used, free, format, args );
165
166 diff --git a/sys-libs/libomp/libomp-3.9.1.ebuild b/sys-libs/libomp/libomp-3.9.1.ebuild
167 new file mode 100644
168 index 0000000..c575e28
169 --- /dev/null
170 +++ b/sys-libs/libomp/libomp-3.9.1.ebuild
171 @@ -0,0 +1,50 @@
172 +# Copyright 1999-2017 Gentoo Foundation
173 +# Distributed under the terms of the GNU General Public License v2
174 +
175 +EAPI=6
176 +
177 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
178 +
179 +inherit cmake-multilib
180 +
181 +MY_P=openmp-${PV}
182 +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
183 +HOMEPAGE="http://openmp.llvm.org"
184 +SRC_URI="http://llvm.org/releases/${PV}/${MY_P}.src.tar.xz"
185 +
186 +# Additional licenses:
187 +# - MIT-licensed Intel code,
188 +# - LLVM Software Grant from Intel.
189 +
190 +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
191 +SLOT="0/3.9"
192 +KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
193 +IUSE="hwloc ompt"
194 +
195 +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
196 +DEPEND="${RDEPEND}
197 + dev-lang/perl"
198 +
199 +S="${WORKDIR}/${MY_P}.src"
200 +
201 +PATCHES=(
202 + # backport of https://reviews.llvm.org/D24563
203 + "${FILESDIR}"/${PN}-3.9.0-optional-aliases.patch
204 + # backport of https://reviews.llvm.org/D25071
205 + "${FILESDIR}"/${PN}-3.9.0-musl-strerror_r.patch
206 + "${FILESDIR}"/${PN}-3.9.0-use-va_copy-macro.patch
207 +)
208 +
209 +multilib_src_configure() {
210 + local libdir="$(get_libdir)"
211 + local mycmakeargs=(
212 + -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}"
213 + -DLIBOMP_USE_HWLOC=$(usex hwloc)
214 + -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
215 + # do not install libgomp.so & libiomp5.so aliases
216 + -DLIBOMP_INSTALL_ALIASES=OFF
217 + # disable unnecessary hack copying stuff back to srcdir
218 + -DLIBOMP_COPY_EXPORTS=OFF
219 + )
220 + cmake-utils_src_configure
221 +}