* [gentoo-dev] [PATCH 2/3] kernel-2.eclass: Rename xmakeopts to more appropriate KERNEL_MAKEOPTS
@ 2023-01-24 23:37 99% ` James Le Cuirot
0 siblings, 0 replies; 1+ results
From: James Le Cuirot @ 2023-01-24 23:37 UTC (permalink / raw
To: gentoo-dev; +Cc: James Le Cuirot
An upper-case name suggests that the variable is exported. This variable
is also not just used for cross-compiling any more.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
---
eclass/kernel-2.eclass | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index f7fcf15743f0..3c78aa5a8445 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -745,24 +745,25 @@ cross_pre_c_headers() {
use headers-only && [[ ${CHOST} != ${CTARGET} ]]
}
-# @FUNCTION: env_setup_xmakeopts
+# @FUNCTION: env_setup_kernel_makeopts
# @USAGE:
# @DESCRIPTION:
-# set the ARCH/CROSS_COMPILE when cross compiling
+# Set the toolchain variables, as well as ARCH and CROSS_COMPILE when
+# cross-compiling.
-env_setup_xmakeopts() {
+env_setup_kernel_makeopts() {
# Kernel ARCH != portage ARCH
export KARCH=$(tc-arch-kernel)
# When cross-compiling, we need to set the ARCH/CROSS_COMPILE
# variables properly or bad things happen !
- xmakeopts=( ARCH="${KARCH}" )
+ KERNEL_MAKEOPTS=( ARCH="${KARCH}" )
if [[ ${CTARGET} != ${CHOST} ]] && ! cross_pre_c_headers; then
- xmakeopts+=( CROSS_COMPILE="${CTARGET}-" )
+ KERNEL_MAKEOPTS+=( CROSS_COMPILE="${CTARGET}-" )
elif type -p ${CHOST}-ar >/dev/null; then
- xmakeopts+=( CROSS_COMPILE="${CHOST}-" )
+ KERNEL_MAKEOPTS+=( CROSS_COMPILE="${CHOST}-" )
fi
- xmakeopts+=(
+ KERNEL_MAKEOPTS+=(
HOSTCC="$(tc-getBUILD_CC)"
CC="$(tc-getCC)"
LD="$(tc-getLD)"
@@ -772,7 +773,7 @@ env_setup_xmakeopts() {
READELF="$(tc-getREADELF)"
STRIP="$(tc-getSTRIP)"
)
- export xmakeopts
+ export KERNEL_MAKEOPTS
}
# @FUNCTION: universal_unpack
@@ -858,8 +859,8 @@ install_universal() {
install_headers() {
local ddir=$(kernel_header_destdir)
- env_setup_xmakeopts
- emake headers_install INSTALL_HDR_PATH="${ED}"${ddir}/.. "${xmakeopts[@]}"
+ env_setup_kernel_makeopts
+ emake headers_install INSTALL_HDR_PATH="${ED}"${ddir}/.. "${KERNEL_MAKEOPTS[@]}"
# let other packages install some of these headers
rm -rf "${ED}"${ddir}/scsi || die #glibc/uclibc/etc...
@@ -1425,8 +1426,8 @@ kernel-2_src_unpack() {
[[ -z ${K_NOSETEXTRAVERSION} ]] && unpack_set_extraversion
unpack_fix_install_path
- # Setup xmakeopts and cd into sourcetree.
- env_setup_xmakeopts
+ # Setup KERNEL_MAKEOPTS and cd into sourcetree.
+ env_setup_kernel_makeopts
cd "${S}" || die
if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then
--
2.39.1
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-01-21 11:03 [gentoo-dev] [PATCH] kernel-2.eclass: Make xmakeopts an array for spaces in toolchain vars James Le Cuirot
2023-01-24 23:37 99% ` [gentoo-dev] [PATCH 2/3] kernel-2.eclass: Rename xmakeopts to more appropriate KERNEL_MAKEOPTS James Le Cuirot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox