1 |
commit: 9bc832c6d39b7b27314d7e08cd34fcd08713fe7f |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 15 17:10:57 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 16 23:28:50 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bc832c6 |
7 |
|
8 |
toolchain-funcs.eclass: deprecate tc-has-openmp |
9 |
|
10 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
eclass/toolchain-funcs.eclass | 19 +++++++++++++++---- |
14 |
1 file changed, 15 insertions(+), 4 deletions(-) |
15 |
|
16 |
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass |
17 |
index 77fb304940b2..9ad5e224b03e 100644 |
18 |
--- a/eclass/toolchain-funcs.eclass |
19 |
+++ b/eclass/toolchain-funcs.eclass |
20 |
@@ -1,4 +1,4 @@ |
21 |
-# Copyright 2002-2021 Gentoo Authors |
22 |
+# Copyright 2002-2022 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
# @ECLASS: toolchain-funcs.eclass |
26 |
@@ -569,11 +569,12 @@ tc-ld-force-bfd() { |
27 |
fi |
28 |
} |
29 |
|
30 |
-# @FUNCTION: tc-has-openmp |
31 |
+# @FUNCTION: _tc-has-openmp |
32 |
+# @INTERNAL |
33 |
# @USAGE: [toolchain prefix] |
34 |
# @DESCRIPTION: |
35 |
# See if the toolchain supports OpenMP. |
36 |
-tc-has-openmp() { |
37 |
+_tc-has-openmp() { |
38 |
local base="${T}/test-tc-openmp" |
39 |
cat <<-EOF > "${base}.c" |
40 |
#include <omp.h> |
41 |
@@ -593,6 +594,16 @@ tc-has-openmp() { |
42 |
return ${ret} |
43 |
} |
44 |
|
45 |
+# @FUNCTION: tc-has-openmp |
46 |
+# @DEPRECATED: tc-check-openmp |
47 |
+# @USAGE: [toolchain prefix] |
48 |
+# @DESCRIPTION: |
49 |
+# See if the toolchain supports OpenMP. This function is deprecated and will be |
50 |
+# removed on 2023-01-01. |
51 |
+tc-has-openmp() { |
52 |
+ _tc-has-openmp "$@" |
53 |
+} |
54 |
+ |
55 |
# @FUNCTION: tc-check-openmp |
56 |
# @DESCRIPTION: |
57 |
# Test for OpenMP support with the current compiler and error out with |
58 |
@@ -601,7 +612,7 @@ tc-has-openmp() { |
59 |
# to test for OpenMP support should be preferred over tc-has-openmp and |
60 |
# printing a custom message, as it presents a uniform interface to the user. |
61 |
tc-check-openmp() { |
62 |
- if ! tc-has-openmp; then |
63 |
+ if ! _tc-has-openmp; then |
64 |
eerror "Your current compiler does not support OpenMP!" |
65 |
|
66 |
if tc-is-gcc; then |