1 |
Signed-off-by: David Seifert <soap@g.o> |
2 |
--- |
3 |
eclass/toolchain-funcs.eclass | 13 +++++++++++++ |
4 |
1 file changed, 13 insertions(+) |
5 |
|
6 |
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass |
7 |
index 9ad5e224b03..54d4b0912a6 100644 |
8 |
--- a/eclass/toolchain-funcs.eclass |
9 |
+++ b/eclass/toolchain-funcs.eclass |
10 |
@@ -611,6 +611,19 @@ tc-has-openmp() { |
11 |
# OpenMP support that has been requested by the ebuild. Using this function |
12 |
# to test for OpenMP support should be preferred over tc-has-openmp and |
13 |
# printing a custom message, as it presents a uniform interface to the user. |
14 |
+# |
15 |
+# You should test for any necessary OpenMP support in pkg_pretend in order to |
16 |
+# warn the user of required toolchain changes. You must still check for OpenMP |
17 |
+# support at build-time, e.g. |
18 |
+# @CODE |
19 |
+# pkg_pretend() { |
20 |
+# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
21 |
+# } |
22 |
+# |
23 |
+# pkg_setup() { |
24 |
+# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
25 |
+# } |
26 |
+# @CODE |
27 |
tc-check-openmp() { |
28 |
if ! _tc-has-openmp; then |
29 |
eerror "Your current compiler does not support OpenMP!" |
30 |
-- |
31 |
2.35.1 |