summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-19 19:25:27 +0000
committerSam James <sam@gentoo.org>2023-02-19 19:30:54 +0000
commit37fc81a57e3ce42fc3059354ad26a8c257ce1851 (patch)
treef9f24c65365ca5fff87a31353a047433c9d572a7 /eclass/toolchain-funcs.eclass
parentsys-devel/gettext: fix macOS bootstrap build. (diff)
downloadgentoo-37fc81a57e3ce42fc3059354ad26a8c257ce1851.tar.gz
gentoo-37fc81a57e3ce42fc3059354ad26a8c257ce1851.tar.bz2
gentoo-37fc81a57e3ce42fc3059354ad26a8c257ce1851.zip
toolchain-funcs.eclass: document tc-endian
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r--eclass/toolchain-funcs.eclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 8a4f33e71bb7..805a3b0dfe61 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -757,6 +757,13 @@ tc-arch() {
tc-ninja_magic_to_arch portage "$@"
}
+# @FUNCTION: tc-endian
+# @USAGE: [toolchain prefix]
+# @RETURN: 'big' or 'little' corresponding to the passed (or host) endianness
+# @DESCRIPTION:
+# Accepts 'host' as an argument which defaults to CTARGET and falls back to CHOST
+# if unspecified. Returns 'big' or 'little' depending on whether 'host' is
+# big or little endian.
tc-endian() {
local host=$1
[[ -z ${host} ]] && host=${CTARGET:-${CHOST}}