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