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 <
chewi@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 c7950b4e22920..42cde638cf276 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}