mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 06:48:18 -07:00
toolchain-funcs.eclass: deprecate tc-has-openmp
Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 2002-2021 Gentoo Authors
|
||||
# Copyright 2002-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: toolchain-funcs.eclass
|
||||
@@ -569,11 +569,12 @@ tc-ld-force-bfd() {
|
||||
fi
|
||||
}
|
||||
|
||||
# @FUNCTION: tc-has-openmp
|
||||
# @FUNCTION: _tc-has-openmp
|
||||
# @INTERNAL
|
||||
# @USAGE: [toolchain prefix]
|
||||
# @DESCRIPTION:
|
||||
# See if the toolchain supports OpenMP.
|
||||
tc-has-openmp() {
|
||||
_tc-has-openmp() {
|
||||
local base="${T}/test-tc-openmp"
|
||||
cat <<-EOF > "${base}.c"
|
||||
#include <omp.h>
|
||||
@@ -593,6 +594,16 @@ tc-has-openmp() {
|
||||
return ${ret}
|
||||
}
|
||||
|
||||
# @FUNCTION: tc-has-openmp
|
||||
# @DEPRECATED: tc-check-openmp
|
||||
# @USAGE: [toolchain prefix]
|
||||
# @DESCRIPTION:
|
||||
# See if the toolchain supports OpenMP. This function is deprecated and will be
|
||||
# removed on 2023-01-01.
|
||||
tc-has-openmp() {
|
||||
_tc-has-openmp "$@"
|
||||
}
|
||||
|
||||
# @FUNCTION: tc-check-openmp
|
||||
# @DESCRIPTION:
|
||||
# Test for OpenMP support with the current compiler and error out with
|
||||
@@ -601,7 +612,7 @@ tc-has-openmp() {
|
||||
# to test for OpenMP support should be preferred over tc-has-openmp and
|
||||
# printing a custom message, as it presents a uniform interface to the user.
|
||||
tc-check-openmp() {
|
||||
if ! tc-has-openmp; then
|
||||
if ! _tc-has-openmp; then
|
||||
eerror "Your current compiler does not support OpenMP!"
|
||||
|
||||
if tc-is-gcc; then
|
||||
|
||||
Reference in New Issue
Block a user