From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: James Le Cuirot <chewi@gentoo.org>
Cc: toolchain@gentoo.org
Subject: Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: Add functions to get pointer size in bytes
Date: Wed, 08 Nov 2023 06:44:51 +0000 [thread overview]
Message-ID: <87edh0n3pp.fsf@gentoo.org> (raw)
In-Reply-To: <20231106222527.25833-1-chewi@gentoo.org>
James Le Cuirot <chewi@gentoo.org> writes:
> tc-get-ptr-size for CHOST and tc-get-build-ptr-size for CBUILD.
>
> Closes: https://bugs.gentoo.org/328401
> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
> ---
lgtm
> eclass/toolchain-funcs.eclass | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> 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
prev parent reply other threads:[~2023-11-08 6:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 22:25 [gentoo-dev] [PATCH] toolchain-funcs.eclass: Add functions to get pointer size in bytes James Le Cuirot
2023-11-08 6:44 ` Sam James [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edh0n3pp.fsf@gentoo.org \
--to=sam@gentoo.org \
--cc=chewi@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox