forked from Mirror/pmbootstrap
envkernel: Set CC and HOSTCC (!1733)
It is necessary to override these environment variables to use an alternate compiler such as gcc6.
This commit is contained in:
parent
70126570a4
commit
ce57fae12d
1 changed files with 5 additions and 0 deletions
|
@ -155,8 +155,12 @@ set_alias_make() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$gcc6_arg" = "1" ]; then
|
if [ "$gcc6_arg" = "1" ]; then
|
||||||
|
cc="gcc6-${prefix}-gcc"
|
||||||
|
hostcc="gcc6-gcc"
|
||||||
cross_compiler="/usr/bin/gcc6-$prefix-"
|
cross_compiler="/usr/bin/gcc6-$prefix-"
|
||||||
else
|
else
|
||||||
|
cc="${prefix}-gcc"
|
||||||
|
hostcc="gcc"
|
||||||
cross_compiler="/usr/bin/$prefix-"
|
cross_compiler="/usr/bin/$prefix-"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -166,6 +170,7 @@ set_alias_make() {
|
||||||
cmd="$cmd ARCH=$arch"
|
cmd="$cmd ARCH=$arch"
|
||||||
cmd="$cmd CROSS_COMPILE=$cross_compiler"
|
cmd="$cmd CROSS_COMPILE=$cross_compiler"
|
||||||
cmd="$cmd make -C /mnt/linux O=/mnt/linux/.output"
|
cmd="$cmd make -C /mnt/linux O=/mnt/linux/.output"
|
||||||
|
cmd="$cmd CC=$cc HOSTCC=$hostcc"
|
||||||
# shellcheck disable=SC2139
|
# shellcheck disable=SC2139
|
||||||
alias make="$cmd"
|
alias make="$cmd"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue