From ce57fae12db7f15ebf9a8b46b71f039efc625770 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Sat, 29 Dec 2018 13:54:07 -0500 Subject: [PATCH] envkernel: Set CC and HOSTCC (!1733) It is necessary to override these environment variables to use an alternate compiler such as gcc6. --- helpers/envkernel.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/helpers/envkernel.sh b/helpers/envkernel.sh index 9cbd4e64..3f2e3758 100644 --- a/helpers/envkernel.sh +++ b/helpers/envkernel.sh @@ -155,8 +155,12 @@ set_alias_make() { esac if [ "$gcc6_arg" = "1" ]; then + cc="gcc6-${prefix}-gcc" + hostcc="gcc6-gcc" cross_compiler="/usr/bin/gcc6-$prefix-" else + cc="${prefix}-gcc" + hostcc="gcc" cross_compiler="/usr/bin/$prefix-" fi @@ -166,6 +170,7 @@ set_alias_make() { cmd="$cmd ARCH=$arch" cmd="$cmd CROSS_COMPILE=$cross_compiler" cmd="$cmd make -C /mnt/linux O=/mnt/linux/.output" + cmd="$cmd CC=$cc HOSTCC=$hostcc" # shellcheck disable=SC2139 alias make="$cmd" }