From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C17FC158043 for ; Fri, 19 Apr 2024 16:14:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0FA3AE2A3E; Fri, 19 Apr 2024 16:14:29 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BA822E2A37 for ; Fri, 19 Apr 2024 16:14:28 +0000 (UTC) From: Mike Gilbert To: gentoo-dev@lists.gentoo.org Cc: Mike Gilbert Subject: [gentoo-dev] [PATCH] toolchain-funcs.eclass: tc-env_build: override (E)SYSROOT Date: Fri, 19 Apr 2024 12:14:25 -0400 Message-ID: <20240419161425.3428694-1-floppym@gentoo.org> X-Mailer: git-send-email 2.44.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 9a2fbe94-74fa-430a-a5d2-4630a203fece X-Archives-Hash: f2b2be32eebedf1343de0e384ae82433 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 --- 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} \ -- 2.44.0