public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: James Le Cuirot <chewi@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Mike Gilbert <floppym@gentoo.org>
Subject: Re: [gentoo-dev] [PATCH] toolchain-funcs.eclass: tc-env_build: override (E)SYSROOT
Date: Fri, 19 Apr 2024 18:56:50 +0100	[thread overview]
Message-ID: <e717832e98eac7ed3fd421af5ac6935aec463ff4.camel@gentoo.org> (raw)
In-Reply-To: <20240419161425.3428694-1-floppym@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]

On Fri, 2024-04-19 at 12:14 -0400, Mike Gilbert wrote:
> When using the CBUILD toolchain, it makes no sense to look for headers
> and libraries in the CHOST-based SYSROOT.
> 
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
>  eclass/toolchain-funcs.eclass | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
> index cde84e6f34c8..58a718180079 100644
> --- a/eclass/toolchain-funcs.eclass
> +++ b/eclass/toolchain-funcs.eclass
> @@ -1,4 +1,4 @@
> -# Copyright 2002-2023 Gentoo Authors
> +# Copyright 2002-2024 Gentoo Authors
>  # Distributed under the terms of the GNU General Public License v2
>  
>  # @ECLASS: toolchain-funcs.eclass
> @@ -384,6 +384,12 @@ tc-export_build_env() {
>  # the target build system does not check.
>  tc-env_build() {
>  	tc-export_build_env
> +	local -x SYSROOT=
> +	if [[ ${EAPI} == 6 ]]; then
> +		local -x ESYSROOT=${EPREFIX}
> +	else
> +		local -x ESYSROOT=${BROOT}
> +	fi
>  	CFLAGS=${BUILD_CFLAGS} \
>  	CXXFLAGS=${BUILD_CXXFLAGS} \
>  	CPPFLAGS=${BUILD_CPPFLAGS} \

What do you need this for? Just wondering because I wouldn't have thought
anything you wrap with tc-env_build would care about ESYSROOT.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 858 bytes --]

  reply	other threads:[~2024-04-19 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 16:14 [gentoo-dev] [PATCH] toolchain-funcs.eclass: tc-env_build: override (E)SYSROOT Mike Gilbert
2024-04-19 17:56 ` James Le Cuirot [this message]
2024-04-19 18:41   ` Mike Gilbert

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=e717832e98eac7ed3fd421af5ac6935aec463ff4.camel@gentoo.org \
    --to=chewi@gentoo.org \
    --cc=floppym@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