From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1718581-garchives=archives.gentoo.org@lists.gentoo.org> 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 finch.gentoo.org (Postfix) with ESMTPS id 80AFD1582EF for <garchives@archives.gentoo.org>; Sun, 16 Feb 2025 18:41:38 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (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) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 69E4834315D for <garchives@archives.gentoo.org>; Sun, 16 Feb 2025 18:41:38 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 653BF1102CD; Sun, 16 Feb 2025 18:41:37 +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 bobolink.gentoo.org (Postfix) with ESMTPS id 5C2301102CD for <gentoo-commits@lists.gentoo.org>; Sun, 16 Feb 2025 18:41:37 +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 0DD2234164C for <gentoo-commits@lists.gentoo.org>; Sun, 16 Feb 2025 18:41:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6CFFA2728 for <gentoo-commits@lists.gentoo.org>; Sun, 16 Feb 2025 18:41:35 +0000 (UTC) From: "Mike Gilbert" <floppym@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, "Mike Gilbert" <floppym@gentoo.org> Message-ID: <1739731035.a1e7d1e7a213a08d6acc94d6b10628259ba49517.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain-funcs.eclass X-VCS-Directories: eclass/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: a1e7d1e7a213a08d6acc94d6b10628259ba49517 X-VCS-Branch: master Date: Sun, 16 Feb 2025 18:41:35 +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: 88868f6f-c1fb-46eb-b68b-e8a2a1a800e3 X-Archives-Hash: 5e6f5b34a8d0769ac91b9b42532dcc3d commit: a1e7d1e7a213a08d6acc94d6b10628259ba49517 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Wed Feb 5 17:09:11 2025 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Sun Feb 16 18:37:15 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1e7d1e7 toolchain-funcs.eclass: avoid using tc-getCPP in compiler checks We usually want to invoke cc -E rather than cpp directly. We should not rely on the quirk of tc-getCPP defaulting to "cc -E" when CPP is unset. Resolves a warning when CPP is set to llvm-cpp, which does not accept the -E option. Closes: https://bugs.gentoo.org/949340 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> eclass/toolchain-funcs.eclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 0abed5b8d75e..754d23f91c06 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -1,4 +1,4 @@ -# Copyright 2002-2024 Gentoo Authors +# Copyright 2002-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: toolchain-funcs.eclass @@ -900,7 +900,7 @@ tc-get-compiler-type() { HAVE_GCC #endif ' - local res=$($(tc-getCPP "$@") -E -P - <<<"${code}") + local res=$($(tc-getCC "$@") -E -P - <<<"${code}") case ${res} in *HAVE_PATHCC*) echo pathcc;; @@ -927,7 +927,7 @@ tc-is-clang() { # compilers rather than maintaining a --version flag matrix, bug #335943. _gcc_fullversion() { local ver="$1"; shift - set -- $($(tc-getCPP "$@") -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__") + set -- $($(tc-getCC "$@") -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__") eval echo "${ver}" } @@ -960,7 +960,7 @@ gcc-micro-version() { # Internal func. Based on _gcc_fullversion() above. _clang_fullversion() { local ver="$1"; shift - set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__") + set -- $($(tc-getCC "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__") eval echo "${ver}" } @@ -1347,14 +1347,14 @@ tc-get-c-rtlib() { # @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__ || + $(tc-getCC) -E -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__ || + $(tc-getBUILD_CC) -E -P - <<< __SIZEOF_POINTER__ || die "Could not determine CBUILD pointer size" }