envkernel.sh: building x86 on x86_64 does not require a cross compiler

Add an exception for this case to use host compiler

Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230416100903.53248-1-julian.winkler1@web.de%3E
This commit is contained in:
Julian Winkler 2023-04-16 12:09:03 +02:00 committed by Oliver Smith
parent d51f31e784
commit ad7ec1635a
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 6 additions and 1 deletions

View File

@ -121,7 +121,8 @@ initialize_chroot() {
arch_substr="${host_arch:0:3}"
if [ "$arch" = "$host_arch" ] || \
{ [ "$arch_substr" = "arm" ] && [ "$arch_substr" = "$arch" ]; } || \
{ [ "$arch" = "arm64" ] && [ "$host_arch" = "aarch64" ]; }; then
{ [ "$arch" = "arm64" ] && [ "$host_arch" = "aarch64" ]; } || \
{ [ "$arch" = "x86" ] && [ "$host_arch" = "x86_64" ]; }; then
need_cross_compiler=0
fi
@ -218,6 +219,10 @@ set_alias_make() {
cross_compiler="/usr/bin/$prefix-"
fi
if [ "$arch" = "x86" ] && [ "$host_arch" = "x86_64" ]; then
cc=$hostcc
fi
# Build make command
cmd="echo '*** pmbootstrap envkernel.sh active for $PWD! ***';"
cmd="$cmd pmbootstrap -q chroot --user --"