From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 5E3E415800F for ; Fri, 27 Jan 2023 22:11:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7E022E09E3; Fri, 27 Jan 2023 22:11:28 +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 49416E09E3 for ; Fri, 27 Jan 2023 22:11:28 +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 1423F341102 for ; Fri, 27 Jan 2023 22:11:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 71FB8888 for ; Fri, 27 Jan 2023 22:11:25 +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: <1674857389.954e5a3ea67dbc14a0ec2a7887e88f424b4a8f4d.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/kernel-2.eclass X-VCS-Directories: eclass/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 954e5a3ea67dbc14a0ec2a7887e88f424b4a8f4d X-VCS-Branch: master Date: Fri, 27 Jan 2023 22:11:25 +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: d8914116-81b4-442f-91ee-fbd1985d0649 X-Archives-Hash: b45b4729bd9a40eb9f1237dc19706aad commit: 954e5a3ea67dbc14a0ec2a7887e88f424b4a8f4d Author: James Le Cuirot gentoo org> AuthorDate: Tue Jan 24 23:33:05 2023 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Fri Jan 27 22:09:49 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=954e5a3e kernel-2.eclass: Rename xmakeopts to more appropriate KERNEL_MAKEOPTS 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 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