eclass/toolchain-funcs: Sync with Gentoo

It's from Gentoo commit f70ca0aa2b8c06f679e05a1b0a9509af6b5ae87a.
This commit is contained in:
Flatcar Buildbot 2023-11-27 07:13:06 +00:00 committed by Krzesimir Nowak
parent b05f9897d7
commit 7f981d87cf

View File

@ -1216,4 +1216,18 @@ tc-get-c-rtlib() {
return 0 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 fi