From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1499721-garchives=archives.gentoo.org@lists.gentoo.org> 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 B6D3315864F for <garchives@archives.gentoo.org>; Thu, 23 Mar 2023 19:31:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F18BAE0830; Thu, 23 Mar 2023 19:31:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 09B1BE0826 for <gentoo-commits@lists.gentoo.org>; Thu, 23 Mar 2023 19:31:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 6ACE3340B1F for <gentoo-commits@lists.gentoo.org>; Thu, 23 Mar 2023 19:31:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A2DCE913 for <gentoo-commits@lists.gentoo.org>; Thu, 23 Mar 2023 19:31:45 +0000 (UTC) From: "Andreas Sturmlechner" <asturm@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org> Message-ID: <1679599881.fa01350086b8d254a03250c6ffab5f2ed4de93b3.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/cmake.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: fa01350086b8d254a03250c6ffab5f2ed4de93b3 X-VCS-Branch: master Date: Thu, 23 Mar 2023 19:31:45 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a2c4845c-28be-482e-a7ba-95e2dedb96eb X-Archives-Hash: 0edb98d240d766c7059a28021e28bcd2 commit: fa01350086b8d254a03250c6ffab5f2ed4de93b3 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Mon Feb 27 23:19:46 2023 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Thu Mar 23 19:31:21 2023 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=fa013500 cmake.eclass: Set CMAKE_SYSROOT in toolchain file when necessary We previously set CMAKE_FIND_ROOT_PATH, but CMAKE_SYSROOT also sets this and more. The latter is needed when cross-compiling Fortran code such as sci-libs/lapack. Without this, it uses the toolchain's default sysroot, adds a -L/usr/${CHOST}/usr/lib flag based on that, reads the libc.so.6 ld script from this directory, does not apply any sysroot to the paths within because the script is outside the sysroot, and finally fails when attempting to link the host's libc.so.6. Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> eclass/cmake.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass index b12b8ec8d6..1986e5cf08 100644 --- a/eclass/cmake.eclass +++ b/eclass/cmake.eclass @@ -502,7 +502,7 @@ cmake_src_configure() { # When cross-compiling with a sysroot (e.g. with crossdev's emerge wrappers) # we need to tell cmake to use libs/headers from the sysroot but programs from / only. cat >> "${toolchain_file}" <<- _EOF_ || die - set(CMAKE_FIND_ROOT_PATH "${SYSROOT}") + set(CMAKE_SYSROOT "${ESYSROOT}") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)