1 |
commit: 48d0f1b5fdfc1f2d6e6be67ff61dbbe96d16ec30 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 6 19:39:02 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 6 22:18:23 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48d0f1b5 |
7 |
|
8 |
sys-libs/libomp: Bump to 4.0.0rc3 |
9 |
|
10 |
sys-libs/libomp/Manifest | 2 +- |
11 |
...-link-latomic-to-provide-atomics-when-ava.patch | 94 ++++++++++++++++++++++ |
12 |
...mp-4.0.0_rc2.ebuild => libomp-4.0.0_rc3.ebuild} | 7 ++ |
13 |
3 files changed, 102 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest |
16 |
index 5e3987a849a..d2ad231e822 100644 |
17 |
--- a/sys-libs/libomp/Manifest |
18 |
+++ b/sys-libs/libomp/Manifest |
19 |
@@ -2,4 +2,4 @@ DIST openmp-3.7.1.src.tar.xz 2026988 SHA256 9a702e20c247014f6de8c45b738c6ea586ec |
20 |
DIST openmp-3.8.1.src.tar.xz 2009572 SHA256 68fcde6ef34e0275884a2de3450a31e931caf1d6fda8606ef14f89c4123617dc SHA512 406e9077817c50bcd58dd50bd334258ebf4b81c3ecce830ae1f427bd7c1fc9376b63fdeb3459c953c341becde82d83be18069bfcd34cbaeee6f1478267c0b2bc WHIRLPOOL b733b7f8f965be86af49af5b02892ec8aacaafe00d310a21c8cc0155f1699da66d1c8aa7709eb230810c4ff68f63896d5a7548777c100ca91a8af998922bdca0 |
21 |
DIST openmp-3.9.0.src.tar.xz 2257596 SHA256 df88f90d7e5b5e9525a35fa2e2b93cbbb83c4882f91df494e87ee3ceddacac91 SHA512 030432bb10d86016f0f1c4f4d8b25f78acdb4aed33c604baf07c825bbcc6198306f2f71a3e56030f20864a92ab0187357aff94d34e47f7166991faf539c0104d WHIRLPOOL 7bfb362c0f087d3867c8cab04ebba23c8e6337d34ddcdfeda1cbe960611eacf1e4356e99bf4d6316b60c9f4b9f9fb23eecdb346feaae72b9cd168ee0aa3cca2a |
22 |
DIST openmp-3.9.1.src.tar.xz 2031588 SHA256 d23b324e422c0d5f3d64bae5f550ff1132c37a070e43c7ca93991676c86c7766 SHA512 80924a6f9765f634d24d7b0aa036d92c912dbd8e067487a14bdd03b4c587fdfc92e83eb29926bfa637ef45be3f133a924f77ab12099ea3706c18e9c42774708b WHIRLPOOL b6ec75d4f9d2b86bb8e2927791cb46e61ff8657fc21f9e0ba9893d81d3382522aca330564f3156c1fbbf765de0499e875e41e11199abe2da8ed1bef057d5e8d8 |
23 |
-DIST openmp-4.0.0rc2.src.tar.xz 2039312 SHA256 d7a927c0a7b0c0572e0c1e316a1bf2b7fbc398418fa411bcb34e7b7d53811715 SHA512 bb53c34861dcb5df52fd079dc816b507302210a3b4ab33d815d01b7d581a233280c10cfaa4ae2039591c4d73a375326b96f3bae142540b4a8041a655139053ae WHIRLPOOL d5d4dba9462737263b39663d12afad1f1c5cacc892fa5914834b12d11815fdd57a7d23669462915cfbc2117d70c283eef4f6193184991bb10dfc1ebc4a54fcb2 |
24 |
+DIST openmp-4.0.0rc3.src.tar.xz 2039416 SHA256 9692a8f8b2344b65afe2374959d02430515a29ff3420552f1c1b94cc663c85eb SHA512 19d289ba040950151131374c83b330a4a2e1501deb0a1dccba0e30cc59e8a48bb28642047c4a1dfa18ddda392c340873707af42976c6f7ce177d2b5383c17373 WHIRLPOOL 98ed954ab77c38f235e0254a32c16be78ded4e61710f96e52bbeb370a84219c1f763042c9d83298f99560086532211cde5e747d2fad385f58f04a7ad5fcb8b65 |
25 |
|
26 |
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 |
27 |
new file mode 100644 |
28 |
index 00000000000..68817558326 |
29 |
--- /dev/null |
30 |
+++ b/sys-libs/libomp/files/4.0.0/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch |
31 |
@@ -0,0 +1,94 @@ |
32 |
+From 7bd70635240f69fcd4da4d98a4aca8aaa779dd11 Mon Sep 17 00:00:00 2001 |
33 |
+From: Michal Gorny <mgorny@g.o> |
34 |
+Date: Fri, 24 Feb 2017 22:15:24 +0000 |
35 |
+Subject: [PATCH] [test] Try to link -latomic to provide atomics when available |
36 |
+ |
37 |
+When using -rtlib=libgcc, the fallback implementation of __atomic_* |
38 |
+builtins is provided via libatomic (included in GCC). However, neither |
39 |
+GCC itself nor clang link libatomic implicitly, and it seems that GCC |
40 |
+upstream expects projects to link it explicitly as necessary. |
41 |
+ |
42 |
+Since compiler-rt provides __atomic_* builtins directly in the main |
43 |
+library, check if they are provided by the default libraries first. |
44 |
+If they are not, check if -latomic is available to provide them |
45 |
+and add explicit -latomic for tests in this case. |
46 |
+ |
47 |
+This fixes unresolved __atomic_load() references when running openmp |
48 |
+tests on i386 with libgcc backend. |
49 |
+ |
50 |
+Differential Revision: https://reviews.llvm.org/D30083 |
51 |
+ |
52 |
+git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@296183 91177308-0d34-0410-b5e6-96231b3b80d8 |
53 |
+--- |
54 |
+ runtime/test/CMakeLists.txt | 13 +++++++++++++ |
55 |
+ runtime/test/lit.cfg | 2 ++ |
56 |
+ runtime/test/lit.site.cfg.in | 2 +- |
57 |
+ 3 files changed, 16 insertions(+), 1 deletion(-) |
58 |
+ |
59 |
+diff --git a/runtime/test/CMakeLists.txt b/runtime/test/CMakeLists.txt |
60 |
+index 8162855..88c02c8 100644 |
61 |
+--- a/runtime/test/CMakeLists.txt |
62 |
++++ b/runtime/test/CMakeLists.txt |
63 |
+@@ -1,6 +1,7 @@ |
64 |
+ # CMakeLists.txt file for unit testing OpenMP Library |
65 |
+ include(FindPythonInterp) |
66 |
+ include(CheckTypeSize) |
67 |
++include(CheckFunctionExists) |
68 |
+ include(CheckLibraryExists) |
69 |
+ |
70 |
+ if(NOT PYTHONINTERP_FOUND) |
71 |
+@@ -11,6 +12,17 @@ endif() |
72 |
+ |
73 |
+ # Some tests use math functions |
74 |
+ check_library_exists(m sqrt "" LIBOMP_HAVE_LIBM) |
75 |
++# When using libgcc, -latomic may be needed for atomics |
76 |
++# (but when using compiler-rt, the atomics will be built-in) |
77 |
++# Note: we can not check for __atomic_load because clang treats it |
78 |
++# as special built-in and that breaks CMake checks |
79 |
++check_function_exists(__atomic_load_1 LIBOMP_HAVE_BUILTIN_ATOMIC) |
80 |
++if(NOT LIBOMP_HAVE_BUILTIN_ATOMIC) |
81 |
++ check_library_exists(atomic __atomic_load_1 "" LIBOMP_HAVE_LIBATOMIC) |
82 |
++else() |
83 |
++ # not needed |
84 |
++ set(LIBOMP_HAVE_LIBATOMIC 0) |
85 |
++endif() |
86 |
+ |
87 |
+ macro(pythonize_bool var) |
88 |
+ if (${var}) |
89 |
+@@ -25,6 +37,7 @@ pythonize_bool(LIBOMP_OMPT_SUPPORT) |
90 |
+ pythonize_bool(LIBOMP_OMPT_BLAME) |
91 |
+ pythonize_bool(LIBOMP_OMPT_TRACE) |
92 |
+ pythonize_bool(LIBOMP_HAVE_LIBM) |
93 |
++pythonize_bool(LIBOMP_HAVE_LIBATOMIC) |
94 |
+ |
95 |
+ set(LIBOMP_TEST_CFLAGS "" CACHE STRING |
96 |
+ "Extra compiler flags to send to the test compiler") |
97 |
+diff --git a/runtime/test/lit.cfg b/runtime/test/lit.cfg |
98 |
+index 7f18da4..bef61d4 100644 |
99 |
+--- a/runtime/test/lit.cfg |
100 |
++++ b/runtime/test/lit.cfg |
101 |
+@@ -52,6 +52,8 @@ config.test_cflags = config.test_openmp_flag + \ |
102 |
+ libs = "" |
103 |
+ if config.has_libm: |
104 |
+ libs += " -lm" |
105 |
++if config.has_libatomic: |
106 |
++ libs += " -latomic" |
107 |
+ |
108 |
+ # Allow XFAIL to work |
109 |
+ config.target_triple = [ ] |
110 |
+diff --git a/runtime/test/lit.site.cfg.in b/runtime/test/lit.site.cfg.in |
111 |
+index 448132e..b0d57ce 100644 |
112 |
+--- a/runtime/test/lit.site.cfg.in |
113 |
++++ b/runtime/test/lit.site.cfg.in |
114 |
+@@ -12,7 +12,7 @@ config.hwloc_library_dir = "@LIBOMP_HWLOC_LIBRARY_DIR@" |
115 |
+ config.using_hwloc = @LIBOMP_USE_HWLOC@ |
116 |
+ config.has_ompt = @LIBOMP_OMPT_SUPPORT@ and @LIBOMP_OMPT_BLAME@ and @LIBOMP_OMPT_TRACE@ |
117 |
+ config.has_libm = @LIBOMP_HAVE_LIBM@ |
118 |
++config.has_libatomic = @LIBOMP_HAVE_LIBATOMIC@ |
119 |
+ |
120 |
+ # Let the main config do the real work. |
121 |
+ lit_config.load_config(config, "@LIBOMP_BASE_DIR@/test/lit.cfg") |
122 |
+- |
123 |
+-- |
124 |
+2.12.0 |
125 |
+ |
126 |
|
127 |
diff --git a/sys-libs/libomp/libomp-4.0.0_rc2.ebuild b/sys-libs/libomp/libomp-4.0.0_rc3.ebuild |
128 |
similarity index 92% |
129 |
rename from sys-libs/libomp/libomp-4.0.0_rc2.ebuild |
130 |
rename to sys-libs/libomp/libomp-4.0.0_rc3.ebuild |
131 |
index 1ff6114e8f1..ebb233b08e0 100644 |
132 |
--- a/sys-libs/libomp/libomp-4.0.0_rc2.ebuild |
133 |
+++ b/sys-libs/libomp/libomp-4.0.0_rc3.ebuild |
134 |
@@ -49,6 +49,13 @@ pkg_setup() { |
135 |
use test && python-any-r1_pkg_setup |
136 |
} |
137 |
|
138 |
+src_prepare() { |
139 |
+ # fix atomic tests with gcc |
140 |
+ eapply "${FILESDIR}"/4.0.0/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch |
141 |
+ |
142 |
+ eapply_user |
143 |
+} |
144 |
+ |
145 |
multilib_src_configure() { |
146 |
local libdir="$(get_libdir)" |
147 |
local mycmakeargs=( |