From: Matoro Mahri <
matoro@users.noreply.github.com>
Rename _test-compile-PROG to test-compile and expose externally for
ebuilds to consume if desired.
Bug:
https://bugs.gentoo.org/897976
Signed-off-by: Matoro Mahri <
matoro@users.noreply.github.com>
---
eclass/flag-o-matic.eclass | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index a4e8f19e0071..6bec3df30881 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: flag-o-matic.eclass
@@ -888,15 +888,14 @@ no-as-needed() {
esac
}
-# @FUNCTION: _test-compile-PROG
+# @FUNCTION: test-compile
# @USAGE: <language> <code>
-# @INTERNAL
# @DESCRIPTION:
# Attempts to compile (and possibly link) the given program. The first
# <language> parameter corresponds to the standard -x compiler argument.
# If the program should additionally be attempted to be linked, the string
# "+ld" should be added to the <language> parameter.
-_test-compile-PROG() {
+test-compile() {
local lang=$1
local code=$2