commit: 7cf428ec804bd740d67df06f778124ee2d10e492 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> AuthorDate: Tue Apr 4 03:15:16 2017 +0000 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> CommitDate: Tue Apr 4 03:15:16 2017 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=7cf428ec
sys-libs/libomp: restore 3.9.1 Now marked stable sys-libs/libomp/Manifest | 5 ++ .../files/libomp-3.9.0-musl-strerror_r.patch | 35 ++++++++++++ .../files/libomp-3.9.0-optional-aliases.patch | 63 ++++++++++++++++++++++ .../files/libomp-3.9.0-use-va_copy-macro.patch | 12 +++++ sys-libs/libomp/libomp-3.9.1.ebuild | 50 +++++++++++++++++ 5 files changed, 165 insertions(+) diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest index db06af9..66d96b2 100644 --- a/sys-libs/libomp/Manifest +++ b/sys-libs/libomp/Manifest @@ -1,5 +1,10 @@ AUX 4.0.0/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch 3456 SHA256 c88bbb1d1c81b69bcece498ae8d4861bd6cbca465d294a9a681796ce5eed96f1 SHA512 677d6d7e316d6df028ebed606cde1a4225ed6e06bacbe81cd527acf57c705858ab5aed2f71946c2404336033bfa985dafee2d56423204a59954a80424ca856e0 WHIRLPOOL cdea0f06b3436f48c1860da75e4c887c08ad031d938f080f1da7d334d73adbb0ae44ed56c94950f3665fb08d680046484f09277101093fbaa1483b5e29679b25 +AUX libomp-3.9.0-musl-strerror_r.patch 1159 SHA256 b1aa6d44d4d613cb1383975831ad49ccf433de5e6ff80fec1686ec161edf3ee7 SHA512 f35c5b9b1acf3cc636b505b8935a974796080fa71d96aee46e4edb559a5c5c03bf95457b27e1f026b4330a052654de539d556c4098f1b4a02cd2f95740bc3a4f WHIRLPOOL debde3f0265408f1a5c1376fcf4b84d6c210b9a8824343e22f86fdd8e1485ac20c2d8668e04ee692f14c8d8a7a13b1eaf0b117fde4565f21cc80aada9f498bb0 +AUX libomp-3.9.0-optional-aliases.patch 2536 SHA256 31c143bdb761a969888348ced721f22be7af7413da0b5238642a75efd8c2fcd7 SHA512 0cf501decca0997ee84754bc6c5b3401dbf408571dc169bbfd3fe892f6d0c730785a1bb4293e55eb47f8e808707810e22fac15702853a06cd7531d7a37c54265 WHIRLPOOL fa722bd91c74307217d7c419a27d6d6a55730bcd144a5e2630c0ab48a974b9ce4686e1a2dc82da735dec525f8ad5c96885a5c27b900cc5ce0057a32c146ef414 +AUX libomp-3.9.0-use-va_copy-macro.patch 665 SHA256 1f6df759676fb048c9e46da328f0068dd6ad448fbbb22ecf0f5a9a8873a411ed SHA512 b02c23725a9f45320f2978f180cb815b92a0b64be4fc3b5ea019fae76c789d572f01cc79399383504b6c4fed3d2b8be059311013b23e26dc63640fa8e3408430 WHIRLPOOL 45b13ca42cf92d1b5ae38e2846247817e8751eaa1fe093c50f4c8b9477c3a57bb51ef6ea1e8869c2f56b836ffd6274c75b10f1dada91a6548d93de05ad1c5458 AUX libomp-4.0.0-use-va_copy-macro.patch 689 SHA256 ab1d7bbb5d2cac529b43eea8e068625b169d7aa1f00c072169fc4c29cbdbe8c2 SHA512 ff1f2983c9ff0a8d8bccb937f8489d368a7de2cd5937b99f9a0c1b8f13331e93b910839ff42bf0384ad43b2c5322f6f9401243ef8828ab483fd429442bf7f149 WHIRLPOOL af1232aa25622e0c36a9f8eae53484a69e88995d079a6139701fc0b34f3debe7f555668cd88d936473009887a46b666f8a73b6369ec1bbad075ecdadb3af4495 +DIST openmp-3.9.1.src.tar.xz 2031588 SHA256 d23b324e422c0d5f3d64bae5f550ff1132c37a070e43c7ca93991676c86c7766 SHA512 80924a6f9765f634d24d7b0aa036d92c912dbd8e067487a14bdd03b4c587fdfc92e83eb29926bfa637ef45be3f133a924f77ab12099ea3706c18e9c42774708b WHIRLPOOL b6ec75d4f9d2b86bb8e2927791cb46e61ff8657fc21f9e0ba9893d81d3382522aca330564f3156c1fbbf765de0499e875e41e11199abe2da8ed1bef057d5e8d8 DIST openmp-4.0.0.src.tar.xz 2040104 SHA256 db55d85a7bb289804dc42fc5c8e35ca24dfc3885782261b675a194fd7e206e26 SHA512 3f17014a81dbaa7e8d1d0e5c0493d6cdec7ffce3f43a08ec010312ab5dfbd706d194a8fea24b9a38003b18a0824ee16f39fa72cabe22ad995773f278d27ad8f8 WHIRLPOOL cec645575370ce728546c39f999e01dd353e8f4d241ab3b920a56f71421b7ea0d288c7e7ccea54ea62a777d96d3c56725e2d2bd509a6f933ff49a37dfcfbb59f +EBUILD libomp-3.9.1.ebuild 1375 SHA256 57c543884575e8370de4257784a419222a99cc93f03deab86ef513c5cb21c7d3 SHA512 d95aa3e0da00843d61c2edb8d840cba377421a768cddffb760f3d2acb1be14892d8fd72e938e1af3cef6b83cc9b445825662ddf92e1705701cd7028a22265ab7 WHIRLPOOL aabd36b3e9c03aa9297e5a019b51586d59622e6cb1e5c4137bc122084cabe226c3464d06c5fbe57844be680905143626f9cf83e971948f489cc9db7d809b2ae7 EBUILD libomp-4.0.0.ebuild 2010 SHA256 047dc3367a12d6bcde5e2752b125e6577062ea83eb0d5c5c23b15b555b1f5e2d SHA512 f0d9a98b5479ba5c393b42935fddc6ae8574dfc14dd7bccf07f4c5d74abacfc81d137f006e4340edc8f41ef83798330f581d6e45299f41c403d252134fc7f0de WHIRLPOOL daabf79677739fd16d8a02b17b5d041e1d54eeded96616807f91d25bdc3572ea2d91ea30ae4485a51480a34bbdce46f1a92702d7fb76d92d967fce5cea5a33b2 MISC metadata.xml 670 SHA256 c32e97e9d85d756302a38aac03d55a14d3e5b43cc910f1dff35b9f0c8bea03b1 SHA512 d4269bb7192e00feed26327bb2ac36db3b1c4f5d55417c22efb9a64fa5a006c17dd39459ecc305e8a9a3a954271ad10013fe5c9159a30ea609513aabddebf485 WHIRLPOOL d0022a64d2cad055eab1c6921cdfd4372fcf9cabd40c5ba7bf74d49eaff5f3498545fe29bbfc20bbee2cc3fed596e6a4d9f408d912f39900bbfb1c6c4aabb61a 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 0000000..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 <mgo...@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/files/libomp-3.9.0-optional-aliases.patch b/sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch new file mode 100644 index 0000000..faf5bb5 --- /dev/null +++ b/sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch @@ -0,0 +1,63 @@ +From 89ab78e360b7b20ebe1bc89736880a8e4aaa9e6e Mon Sep 17 00:00:00 2001 +From: Michal Gorny <mgo...@gentoo.org> +Date: Wed, 14 Sep 2016 17:46:27 +0000 +Subject: [PATCH] [cmake] Make libgomp & libiomp5 alias install optional + +Introduce a new LIBOMP_INSTALL_VARIABLES cache variable that can be used +to disable creating libgomp and libiomp5 aliases on 'make install'. +Those aliases are undesired e.g. on Gentoo systems where libomp is used +purely by clang. + +Differential Revision: https://reviews.llvm.org/D24563 + +git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@281512 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + runtime/CMakeLists.txt | 4 ++++ + runtime/src/CMakeLists.txt | 16 +++++++++------- + 2 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt +index 9db058b..e8e9a74 100644 +--- a/runtime/CMakeLists.txt ++++ b/runtime/CMakeLists.txt +@@ -340,6 +340,10 @@ endif() + + set(LIBOMP_LIB_FILE ${LIBOMP_LIB_NAME}${LIBOMP_LIBRARY_SUFFIX}) + ++# Optional backwards compatibility aliases. ++set(LIBOMP_INSTALL_ALIASES TRUE CACHE BOOL ++ "Install libgomp and libiomp5 library aliases for backwards compatibility") ++ + # Print configuration after all variables are set. + if(${LIBOMP_STANDALONE_BUILD}) + libomp_say("Operating System -- ${CMAKE_SYSTEM_NAME}") +diff --git a/runtime/src/CMakeLists.txt b/runtime/src/CMakeLists.txt +index 777434d..c80f88d 100644 +--- a/runtime/src/CMakeLists.txt ++++ b/runtime/src/CMakeLists.txt +@@ -305,13 +305,15 @@ else() + + install(TARGETS omp ${LIBOMP_INSTALL_KIND} DESTINATION lib${LIBOMP_LIBDIR_SUFFIX}) + +- # Create aliases (symlinks) of the library for backwards compatibility +- set(LIBOMP_ALIASES "libgomp;libiomp5") +- foreach(alias IN LISTS LIBOMP_ALIASES) +- install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\" +- \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY +- \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})") +- endforeach() ++ if(${LIBOMP_INSTALL_ALIASES}) ++ # Create aliases (symlinks) of the library for backwards compatibility ++ set(LIBOMP_ALIASES "libgomp;libiomp5") ++ foreach(alias IN LISTS LIBOMP_ALIASES) ++ install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\" ++ \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY ++ \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})") ++ endforeach() ++ endif() + endif() + install( + FILES +-- +2.4.10 + 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 new file mode 100644 index 0000000..ae7cf6a --- /dev/null +++ b/sys-libs/libomp/files/libomp-3.9.0-use-va_copy-macro.patch @@ -0,0 +1,12 @@ +diff -Naur openmp-3.9.0.orig/runtime/src/kmp_str.c openmp-3.9.0/runtime/src/kmp_str.c +--- openmp-3.9.0.orig/runtime/src/kmp_str.c 2016-11-01 12:48:23.089878111 -0700 ++++ openmp-3.9.0/runtime/src/kmp_str.c 2016-11-01 12:49:43.043419074 -0700 +@@ -208,7 +208,7 @@ + + #if ! KMP_OS_WINDOWS + va_list _args; +- __va_copy( _args, args ); // Make copy of args. ++ va_copy( _args, args ); // Make copy of args. + #define args _args // Substitute args with its copy, _args. + #endif // KMP_OS_WINDOWS + rc = KMP_VSNPRINTF( buffer->str + buffer->used, free, format, args ); diff --git a/sys-libs/libomp/libomp-3.9.1.ebuild b/sys-libs/libomp/libomp-3.9.1.ebuild new file mode 100644 index 0000000..c575e28 --- /dev/null +++ b/sys-libs/libomp/libomp-3.9.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} + +inherit cmake-multilib + +MY_P=openmp-${PV} +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="http://openmp.llvm.org" +SRC_URI="http://llvm.org/releases/${PV}/${MY_P}.src.tar.xz" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0/3.9" +KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="hwloc ompt" + +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + dev-lang/perl" + +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 + "${FILESDIR}"/${PN}-3.9.0-use-va_copy-macro.patch +) + +multilib_src_configure() { + local libdir="$(get_libdir)" + local mycmakeargs=( + -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}" + -DLIBOMP_USE_HWLOC=$(usex hwloc) + -DLIBOMP_OMPT_SUPPORT=$(usex ompt) + # do not install libgomp.so & libiomp5.so aliases + -DLIBOMP_INSTALL_ALIASES=OFF + # disable unnecessary hack copying stuff back to srcdir + -DLIBOMP_COPY_EXPORTS=OFF + ) + cmake-utils_src_configure +}