commit: b67815c83cbc6aea8058396fa26b4cfa586a7fe9 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> AuthorDate: Tue Mar 14 00:03:18 2017 +0000 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> CommitDate: Tue Mar 14 00:03:18 2017 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=b67815c8
sys-libs/libomp: version bump to 4.0.0 sys-libs/libomp/Manifest | 11 +-- ...-link-latomic-to-provide-atomics-when-ava.patch | 94 ++++++++++++++++++++++ .../files/libomp-3.9.0-musl-strerror_r.patch | 35 -------- .../files/libomp-3.9.0-optional-aliases.patch | 63 --------------- ....patch => libomp-4.0.0-use-va_copy-macro.patch} | 6 +- sys-libs/libomp/libomp-3.9.0.ebuild | 51 ------------ sys-libs/libomp/libomp-3.9.1.ebuild | 51 ------------ sys-libs/libomp/libomp-4.0.0.ebuild | 80 ++++++++++++++++++ 8 files changed, 181 insertions(+), 210 deletions(-) diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest index f90fb26..db06af9 100644 --- a/sys-libs/libomp/Manifest +++ b/sys-libs/libomp/Manifest @@ -1,8 +1,5 @@ -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 -DIST openmp-3.9.0.src.tar.xz 2257596 SHA256 df88f90d7e5b5e9525a35fa2e2b93cbbb83c4882f91df494e87ee3ceddacac91 SHA512 030432bb10d86016f0f1c4f4d8b25f78acdb4aed33c604baf07c825bbcc6198306f2f71a3e56030f20864a92ab0187357aff94d34e47f7166991faf539c0104d WHIRLPOOL 7bfb362c0f087d3867c8cab04ebba23c8e6337d34ddcdfeda1cbe960611eacf1e4356e99bf4d6316b60c9f4b9f9fb23eecdb346feaae72b9cd168ee0aa3cca2a -DIST openmp-3.9.1.src.tar.xz 2031588 SHA256 d23b324e422c0d5f3d64bae5f550ff1132c37a070e43c7ca93991676c86c7766 SHA512 80924a6f9765f634d24d7b0aa036d92c912dbd8e067487a14bdd03b4c587fdfc92e83eb29926bfa637ef45be3f133a924f77ab12099ea3706c18e9c42774708b WHIRLPOOL b6ec75d4f9d2b86bb8e2927791cb46e61ff8657fc21f9e0ba9893d81d3382522aca330564f3156c1fbbf765de0499e875e41e11199abe2da8ed1bef057d5e8d8 -EBUILD libomp-3.9.0.ebuild 1320 SHA256 8f1a0a85cd4ba2dedf819307f40dbf872864e701cb27e9ee4ea080ac94a92d9d SHA512 0a5c56afe794ddcb7ba77c972a131ee80a95f204ae36720e93a0d669a06306cfc3bef7f275f27d7ba41e986ac55105b6fc8949b8e22e71a4b9d325b6cc61b800 WHIRLPOOL 8404678d31684a6abcc564907e73d76771f6a9a0ab02e7e28524e217b722bbec06c7ba46966f4d9c1833b24c794dabb2161bb7f8d406ce5ccdc1eec6ce177caf -EBUILD libomp-3.9.1.ebuild 1320 SHA256 8f1a0a85cd4ba2dedf819307f40dbf872864e701cb27e9ee4ea080ac94a92d9d SHA512 0a5c56afe794ddcb7ba77c972a131ee80a95f204ae36720e93a0d669a06306cfc3bef7f275f27d7ba41e986ac55105b6fc8949b8e22e71a4b9d325b6cc61b800 WHIRLPOOL 8404678d31684a6abcc564907e73d76771f6a9a0ab02e7e28524e217b722bbec06c7ba46966f4d9c1833b24c794dabb2161bb7f8d406ce5ccdc1eec6ce177caf +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-4.0.0-use-va_copy-macro.patch 689 SHA256 ab1d7bbb5d2cac529b43eea8e068625b169d7aa1f00c072169fc4c29cbdbe8c2 SHA512 ff1f2983c9ff0a8d8bccb937f8489d368a7de2cd5937b99f9a0c1b8f13331e93b910839ff42bf0384ad43b2c5322f6f9401243ef8828ab483fd429442bf7f149 WHIRLPOOL af1232aa25622e0c36a9f8eae53484a69e88995d079a6139701fc0b34f3debe7f555668cd88d936473009887a46b666f8a73b6369ec1bbad075ecdadb3af4495 +DIST openmp-4.0.0.src.tar.xz 2040104 SHA256 db55d85a7bb289804dc42fc5c8e35ca24dfc3885782261b675a194fd7e206e26 SHA512 3f17014a81dbaa7e8d1d0e5c0493d6cdec7ffce3f43a08ec010312ab5dfbd706d194a8fea24b9a38003b18a0824ee16f39fa72cabe22ad995773f278d27ad8f8 WHIRLPOOL cec645575370ce728546c39f999e01dd353e8f4d241ab3b920a56f71421b7ea0d288c7e7ccea54ea62a777d96d3c56725e2d2bd509a6f933ff49a37dfcfbb59f +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/4.0.0/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch b/sys-libs/libomp/files/4.0.0/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch new file mode 100644 index 0000000..6881755 --- /dev/null +++ b/sys-libs/libomp/files/4.0.0/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch @@ -0,0 +1,94 @@ +From 7bd70635240f69fcd4da4d98a4aca8aaa779dd11 Mon Sep 17 00:00:00 2001 +From: Michal Gorny <[email protected]> +Date: Fri, 24 Feb 2017 22:15:24 +0000 +Subject: [PATCH] [test] Try to link -latomic to provide atomics when available + +When using -rtlib=libgcc, the fallback implementation of __atomic_* +builtins is provided via libatomic (included in GCC). However, neither +GCC itself nor clang link libatomic implicitly, and it seems that GCC +upstream expects projects to link it explicitly as necessary. + +Since compiler-rt provides __atomic_* builtins directly in the main +library, check if they are provided by the default libraries first. +If they are not, check if -latomic is available to provide them +and add explicit -latomic for tests in this case. + +This fixes unresolved __atomic_load() references when running openmp +tests on i386 with libgcc backend. + +Differential Revision: https://reviews.llvm.org/D30083 + +git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@296183 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + runtime/test/CMakeLists.txt | 13 +++++++++++++ + runtime/test/lit.cfg | 2 ++ + runtime/test/lit.site.cfg.in | 2 +- + 3 files changed, 16 insertions(+), 1 deletion(-) + +diff --git a/runtime/test/CMakeLists.txt b/runtime/test/CMakeLists.txt +index 8162855..88c02c8 100644 +--- a/runtime/test/CMakeLists.txt ++++ b/runtime/test/CMakeLists.txt +@@ -1,6 +1,7 @@ + # CMakeLists.txt file for unit testing OpenMP Library + include(FindPythonInterp) + include(CheckTypeSize) ++include(CheckFunctionExists) + include(CheckLibraryExists) + + if(NOT PYTHONINTERP_FOUND) +@@ -11,6 +12,17 @@ endif() + + # Some tests use math functions + check_library_exists(m sqrt "" LIBOMP_HAVE_LIBM) ++# When using libgcc, -latomic may be needed for atomics ++# (but when using compiler-rt, the atomics will be built-in) ++# Note: we can not check for __atomic_load because clang treats it ++# as special built-in and that breaks CMake checks ++check_function_exists(__atomic_load_1 LIBOMP_HAVE_BUILTIN_ATOMIC) ++if(NOT LIBOMP_HAVE_BUILTIN_ATOMIC) ++ check_library_exists(atomic __atomic_load_1 "" LIBOMP_HAVE_LIBATOMIC) ++else() ++ # not needed ++ set(LIBOMP_HAVE_LIBATOMIC 0) ++endif() + + macro(pythonize_bool var) + if (${var}) +@@ -25,6 +37,7 @@ pythonize_bool(LIBOMP_OMPT_SUPPORT) + pythonize_bool(LIBOMP_OMPT_BLAME) + pythonize_bool(LIBOMP_OMPT_TRACE) + pythonize_bool(LIBOMP_HAVE_LIBM) ++pythonize_bool(LIBOMP_HAVE_LIBATOMIC) + + set(LIBOMP_TEST_CFLAGS "" CACHE STRING + "Extra compiler flags to send to the test compiler") +diff --git a/runtime/test/lit.cfg b/runtime/test/lit.cfg +index 7f18da4..bef61d4 100644 +--- a/runtime/test/lit.cfg ++++ b/runtime/test/lit.cfg +@@ -52,6 +52,8 @@ config.test_cflags = config.test_openmp_flag + \ + libs = "" + if config.has_libm: + libs += " -lm" ++if config.has_libatomic: ++ libs += " -latomic" + + # Allow XFAIL to work + config.target_triple = [ ] +diff --git a/runtime/test/lit.site.cfg.in b/runtime/test/lit.site.cfg.in +index 448132e..b0d57ce 100644 +--- a/runtime/test/lit.site.cfg.in ++++ b/runtime/test/lit.site.cfg.in +@@ -12,7 +12,7 @@ config.hwloc_library_dir = "@LIBOMP_HWLOC_LIBRARY_DIR@" + config.using_hwloc = @LIBOMP_USE_HWLOC@ + config.has_ompt = @LIBOMP_OMPT_SUPPORT@ and @LIBOMP_OMPT_BLAME@ and @LIBOMP_OMPT_TRACE@ + config.has_libm = @LIBOMP_HAVE_LIBM@ ++config.has_libatomic = @LIBOMP_HAVE_LIBATOMIC@ + + # Let the main config do the real work. + lit_config.load_config(config, "@LIBOMP_BASE_DIR@/test/lit.cfg") +- +-- +2.12.0 + 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 deleted file mode 100644 index 4fbf9f6..0000000 --- a/sys-libs/libomp/files/libomp-3.9.0-musl-strerror_r.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4fa7d5e207a4f7ef79b423b7d9658b7625795f5c Mon Sep 17 00:00:00 2001 -From: Michal Gorny <[email protected]> -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 deleted file mode 100644 index faf5bb5..0000000 --- a/sys-libs/libomp/files/libomp-3.9.0-optional-aliases.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 89ab78e360b7b20ebe1bc89736880a8e4aaa9e6e Mon Sep 17 00:00:00 2001 -From: Michal Gorny <[email protected]> -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-4.0.0-use-va_copy-macro.patch similarity index 61% rename from sys-libs/libomp/files/libomp-3.9.0-use-va_copy-macro.patch rename to sys-libs/libomp/files/libomp-4.0.0-use-va_copy-macro.patch index ae7cf6a..6d8cc9b 100644 --- a/sys-libs/libomp/files/libomp-3.9.0-use-va_copy-macro.patch +++ b/sys-libs/libomp/files/libomp-4.0.0-use-va_copy-macro.patch @@ -1,6 +1,6 @@ -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 +diff -Naur openmp-4.0.0.src.orig/runtime/src/kmp_str.cpp openmp-4.0.0.src/runtime/src/kmp_str.cpp +--- openmp-4.0.0.src.orig/runtime/src/kmp_str.cpp 2017-03-13 16:59:41.294879402 -0700 ++++ openmp-4.0.0.src/runtime/src/kmp_str.cpp 2017-03-13 17:00:40.521420835 -0700 @@ -208,7 +208,7 @@ #if ! KMP_OS_WINDOWS diff --git a/sys-libs/libomp/libomp-3.9.0.ebuild b/sys-libs/libomp/libomp-3.9.0.ebuild deleted file mode 100644 index db4d623..0000000 --- a/sys-libs/libomp/libomp-3.9.0.ebuild +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -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 ~x86" -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 -} diff --git a/sys-libs/libomp/libomp-3.9.1.ebuild b/sys-libs/libomp/libomp-3.9.1.ebuild deleted file mode 100644 index db4d623..0000000 --- a/sys-libs/libomp/libomp-3.9.1.ebuild +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -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 ~x86" -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 -} diff --git a/sys-libs/libomp/libomp-4.0.0.ebuild b/sys-libs/libomp/libomp-4.0.0.ebuild new file mode 100644 index 0000000..d68e031 --- /dev/null +++ b/sys-libs/libomp/libomp-4.0.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-multilib python-any-r1 + +DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" +HOMEPAGE="http://openmp.llvm.org" +SRC_URI="http://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz" + +# Additional licenses: +# - MIT-licensed Intel code, +# - LLVM Software Grant from Intel. + +LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="hwloc ompt test" + +RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" +# tests: +# - dev-python/lit provides the test runner +# - sys-devel/llvm provide test utils (e.g. FileCheck) +# - sys-devel/clang provides the compiler to run tests +DEPEND="${RDEPEND} + dev-lang/perl + test? ( + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') + sys-devel/llvm + >=sys-devel/clang-3.9.0 + )" + +S=${WORKDIR}/openmp-${PV/_/}.src + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + # fix atomic tests with gcc + eapply "${FILESDIR}"/4.0.0/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch + eapply "${FILESDIR}"/${P}-use-va_copy-macro.patch + + eapply_user +} + +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 + -DLIBOMP_TEST_COMPILER="$(type -P "${CHOST}-clang")" + ) + cmake-utils_src_configure +} + +multilib_src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + + cmake-utils_src_make check-libomp +}
