summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r--eclass/toolchain-funcs.eclass14
1 files changed, 14 insertions, 0 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 8fef764ad597..5da93063866b 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -1216,4 +1216,18 @@ tc-get-c-rtlib() {
return 0
}
+# @FUNCTION: tc-get-ptr-size
+# @RETURN: Size of a pointer in bytes for CHOST (e.g. 4 or 8).
+tc-get-ptr-size() {
+ $(tc-getCPP) -P - <<< __SIZEOF_POINTER__ ||
+ die "Could not determine CHOST pointer size"
+}
+
+# @FUNCTION: tc-get-build-ptr-size
+# @RETURN: Size of a pointer in bytes for CBUILD (e.g. 4 or 8).
+tc-get-build-ptr-size() {
+ $(tc-getBUILD_CPP) -P - <<< __SIZEOF_POINTER__ ||
+ die "Could not determine CBUILD pointer size"
+}
+
fi