summaryrefslogtreecommitdiff
path: root/eclass/toolchain-funcs.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-20 02:17:30 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-20 02:17:30 +0000
commit8dd17625671faf6a47abf31d4c96a1e20d764ba5 (patch)
tree6dd5062cd293d1c2fc5af1f89cd548c7b3a62f3c /eclass/toolchain-funcs.eclass
parentd4725f7e03f4d243d29d408f4b9de39459e00d4c (diff)
gentoo auto-resync : 20:02:2023 - 02:17:29
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}}