diff options
author | James Le Cuirot <chewi@gentoo.org> | 2023-01-24 23:33:05 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2023-01-27 22:09:49 +0000 |
commit | 954e5a3ea67dbc14a0ec2a7887e88f424b4a8f4d (patch) | |
tree | 12bd00a4ba561b323f6a9f475b99f1a8df64b26e /eclass | |
parent | kernel-2.eclass: Make xmakeopts an array for spaces in toolchain vars (diff) | |
download | gentoo-954e5a3ea67dbc14a0ec2a7887e88f424b4a8f4d.tar.gz gentoo-954e5a3ea67dbc14a0ec2a7887e88f424b4a8f4d.tar.bz2 gentoo-954e5a3ea67dbc14a0ec2a7887e88f424b4a8f4d.zip |
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 <chewi@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kernel-2.eclass | 25 |
1 files 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 |