Fix bug 68903; Allows the CROSS_COMPILE env to be set for kernel compiles. Added --kernel-cross-compile= option

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@215 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Eric Edgar 20 years ago
parent 97a08cd055
commit 58fcd673e5

@ -50,6 +50,7 @@ longusage() {
echo " --kernel-cc=<compiler> Compiler to use for kernel (e.g. distcc)"
echo " --kernel-as=<assembler> Assembler to use for kernel"
echo " --kernel-ld=<linker> Linker to use for kernel"
echo " --kernel-cross-compile=<cross var> CROSS_COMPILE kernel variable"
echo " --kernel-make=<makeprg> GNU Make to use for kernel"
echo " --utils-cc=<compiler> Compiler to use for utilities"
echo " --utils-as=<assembler> Assembler to use for utils"
@ -133,6 +134,11 @@ parse_cmdline() {
CMD_KERNEL_MAKE=`parse_opt "$*"`
print_info 2 "CMD_KERNEL_MAKE: $CMD_KERNEL_MAKE"
;;
--kernel-cross-compile=*)
CMD_KERNEL_CROSS_COMPILE=`parse_opt "$*"`
CMD_KERNEL_CROSS_COMPILE=$(echo ${CMD_KERNEL_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
print_info 2 "CMD_KERNEL_CROSS_COMPILE: $CMD_KERNEL_CROSS_COMPILE"
;;
--utils-cc=*)
CMD_UTILS_CC=`parse_opt "$*"`
print_info 2 "CMD_UTILS_CC: $CMD_UTILS_CC"

@ -18,6 +18,11 @@ compile_kernel_args()
ARGS="${ARGS} AS=\"${KERNEL_AS}\""
fi
if [ "${KERNEL_CROSS_COMPILE}" != '' ]
then
ARGS="${ARGS} CROSS_COMPILE=\"${KERNEL_CROSS_COMPILE}\""
fi
echo -n "${ARGS}"
}
@ -88,6 +93,10 @@ export_kernel_args()
then
export AS="${KERNEL_AS}"
fi
if [ "${KERNEL_CROSS_COMPILE}" != '' ]
then
export CROSS_COMPILE="${KERNEL_CROSS_COMPILE}"
fi
}
unset_kernel_args()
@ -104,6 +113,10 @@ unset_kernel_args()
then
unset AS
fi
if [ "${KERNEL_CROSS_COMPILE}" != '' ]
then
unset CROSS_COMPILE
fi
}
compile_generic() {

@ -133,6 +133,11 @@ determine_real_args() {
KERNEL_AS="${CMD_KERNEL_AS}"
fi
if [ "${CMD_KERNEL_CROSS_COMPILE}" != '' ]
then
KERNEL_CROSS_COMPILE="${CMD_KERNEL_CROSS_COMPILE}"
fi
if [ "${CMD_UTILS_CC}" != '' ]
then
UTILS_CC="${CMD_UTILS_CC}"

Loading…
Cancel
Save