From 7f981d87cfeb8e9a9666c8f79e2d5d4b0526246e Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Nov 2023 07:13:06 +0000 Subject: [PATCH] eclass/toolchain-funcs: Sync with Gentoo It's from Gentoo commit f70ca0aa2b8c06f679e05a1b0a9509af6b5ae87a. --- .../portage-stable/eclass/toolchain-funcs.eclass | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass index 8fef764ad5..5da9306386 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass +++ b/sdk_container/src/third_party/portage-stable/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