From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6CDC115807A for ; Thu, 05 Jun 2025 10:56:09 +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)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 587BB34315C for ; Thu, 05 Jun 2025 10:56:09 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 8846A1103C1; Thu, 05 Jun 2025 10:56:04 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 bobolink.gentoo.org (Postfix) with ESMTPS id 7DE8D1103C1 for ; Thu, 05 Jun 2025 10:56:04 +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 3CF41343069 for ; Thu, 05 Jun 2025 10:56:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A7BDA28EC for ; Thu, 05 Jun 2025 10:56:02 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1749120905.0aa27096d9614b631e016586a8f6eb4df696ff75.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/linux-info.eclass X-VCS-Directories: eclass/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 0aa27096d9614b631e016586a8f6eb4df696ff75 X-VCS-Branch: master Date: Thu, 05 Jun 2025 10:56:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b37c5468-388d-4c64-a50c-a4d24bf3d734 X-Archives-Hash: e0ef60380931320e48f26446ac61873b commit: 0aa27096d9614b631e016586a8f6eb4df696ff75 Author: James Le Cuirot gentoo org> AuthorDate: Tue May 20 16:30:34 2025 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Thu Jun 5 10:55:05 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0aa27096 linux-info.eclass: Set the correct ARCH for make in getfilevar Currently, it unsets ARCH, so it uses the build architecture. This is fine if you have the full kernel sources, which is usually the case. However, an install-extmod-build script was added to Linux fairly recently that installs just the files needed to build out-of-tree modules in a distro-neutral manner. It saves space by only including the arch files for the target architecture. I checked the history, and tc-arch-kernel didn't exist when the unset line was added. If it had, this approach probably would have been taken at the time. Signed-off-by: James Le Cuirot gentoo.org> eclass/linux-info.eclass | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index c7950b4e2292..42cde638cf27 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -219,7 +219,7 @@ qeerror() { qout eerror "${@}" ; } # done by including the 'configfile', and printing the variable with Make. # It WILL break if your makefile has missing dependencies! getfilevar() { - local ERROR basefname basedname myARCH="${ARCH}" + local ERROR basefname basedname ERROR=0 [[ -z "${1}" ]] && ERROR=1 @@ -232,16 +232,13 @@ getfilevar() { else basefname="$(basename ${2})" basedname="$(dirname ${2})" - unset ARCH # We use nonfatal because we want the caller to take care of things #373151 # Pass need-config= to make to avoid config check in kernel Makefile. # Pass dot-config=0 to avoid the config check in kernels prior to 5.4. echo -e "e:\\n\\t@echo \$(${1})\\ninclude ${basefname}" | \ nonfatal emake -C "${basedname}" --no-print-directory M="${T}" \ - dot-config=0 need-config= need-compiler= -s -f - 2>/dev/null - - ARCH=${myARCH} + ARCH="$(tc-arch-kernel)" dot-config=0 need-config= need-compiler= -s -f - 2>/dev/null fi }