diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-03-06 20:39:02 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-03-06 23:18:23 +0100 |
commit | 48d0f1b5fdfc1f2d6e6be67ff61dbbe96d16ec30 (patch) | |
tree | 7dbaa98e9eba3d8b1f4f8719c9fb2c6e887104e6 /sys-libs/libomp | |
parent | sys-libs/libcxx: Bump to 4.0.0rc3 (diff) | |
download | gentoo-48d0f1b5fdfc1f2d6e6be67ff61dbbe96d16ec30.tar.gz gentoo-48d0f1b5fdfc1f2d6e6be67ff61dbbe96d16ec30.tar.bz2 gentoo-48d0f1b5fdfc1f2d6e6be67ff61dbbe96d16ec30.zip |
sys-libs/libomp: Bump to 4.0.0rc3
Diffstat (limited to 'sys-libs/libomp')
-rw-r--r-- | sys-libs/libomp/Manifest | 2 | ||||
-rw-r--r-- | sys-libs/libomp/files/4.0.0/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch | 94 | ||||
-rw-r--r-- | sys-libs/libomp/libomp-4.0.0_rc3.ebuild (renamed from sys-libs/libomp/libomp-4.0.0_rc2.ebuild) | 7 |
3 files changed, 102 insertions, 1 deletions
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest index 5e3987a849ab..d2ad231e822a 100644 --- a/sys-libs/libomp/Manifest +++ b/sys-libs/libomp/Manifest @@ -2,4 +2,4 @@ DIST openmp-3.7.1.src.tar.xz 2026988 SHA256 9a702e20c247014f6de8c45b738c6ea586ec DIST openmp-3.8.1.src.tar.xz 2009572 SHA256 68fcde6ef34e0275884a2de3450a31e931caf1d6fda8606ef14f89c4123617dc SHA512 406e9077817c50bcd58dd50bd334258ebf4b81c3ecce830ae1f427bd7c1fc9376b63fdeb3459c953c341becde82d83be18069bfcd34cbaeee6f1478267c0b2bc WHIRLPOOL b733b7f8f965be86af49af5b02892ec8aacaafe00d310a21c8cc0155f1699da66d1c8aa7709eb230810c4ff68f63896d5a7548777c100ca91a8af998922bdca0 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 -DIST openmp-4.0.0rc2.src.tar.xz 2039312 SHA256 d7a927c0a7b0c0572e0c1e316a1bf2b7fbc398418fa411bcb34e7b7d53811715 SHA512 bb53c34861dcb5df52fd079dc816b507302210a3b4ab33d815d01b7d581a233280c10cfaa4ae2039591c4d73a375326b96f3bae142540b4a8041a655139053ae WHIRLPOOL d5d4dba9462737263b39663d12afad1f1c5cacc892fa5914834b12d11815fdd57a7d23669462915cfbc2117d70c283eef4f6193184991bb10dfc1ebc4a54fcb2 +DIST openmp-4.0.0rc3.src.tar.xz 2039416 SHA256 9692a8f8b2344b65afe2374959d02430515a29ff3420552f1c1b94cc663c85eb SHA512 19d289ba040950151131374c83b330a4a2e1501deb0a1dccba0e30cc59e8a48bb28642047c4a1dfa18ddda392c340873707af42976c6f7ce177d2b5383c17373 WHIRLPOOL 98ed954ab77c38f235e0254a32c16be78ded4e61710f96e52bbeb370a84219c1f763042c9d83298f99560086532211cde5e747d2fad385f58f04a7ad5fcb8b65 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 000000000000..688175583269 --- /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 <mgorny@gentoo.org> +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/libomp-4.0.0_rc2.ebuild b/sys-libs/libomp/libomp-4.0.0_rc3.ebuild index 1ff6114e8f15..ebb233b08e06 100644 --- a/sys-libs/libomp/libomp-4.0.0_rc2.ebuild +++ b/sys-libs/libomp/libomp-4.0.0_rc3.ebuild @@ -49,6 +49,13 @@ 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_user +} + multilib_src_configure() { local libdir="$(get_libdir)" local mycmakeargs=( |