Mail archive
alpine-aports

[alpine-aports] [PATCH 2/2] main/linux-vanilla: fix cross-compile support

From: Daniel Sabogal <dsabogalcc_at_gmail.com>
Date: Thu, 18 Jan 2018 16:15:33 -0500

---
 main/linux-vanilla/APKBUILD | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/main/linux-vanilla/APKBUILD b/main/linux-vanilla/APKBUILD
index 88dd55bd41..cd46ca8b73 100644
--- a/main/linux-vanilla/APKBUILD
+++ b/main/linux-vanilla/APKBUILD
_at_@ -106,7 +106,7 @@ prepare() {
 		cp "$srcdir"/$_config "$_builddir"/.config || return 1
 		make -C "$srcdir"/linux-$_kernver \
 			O="$_builddir" \
-			HOSTCC="${CC:-gcc}" \
+			ARCH="$_carch" HOSTCC="$HOSTCC" \
 			silentoldconfig || return 1
 	done
 }
_at_@ -115,7 +115,7 @@ build() {
 	unset LDFLAGS
 	for i in $_flavors; do
 		cd "$srcdir"/build-$i
-		make CC="${CC:-gcc}" \
+		make ARCH="$_carch" CC="${CC:-gcc}" \
 			KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
 			|| return 1
 	done
_at_@ -146,6 +146,7 @@ _package() {
 	esac
 
 	make -j1 modules_install $_install \
+		ARCH="$_carch" \
 		INSTALL_MOD_PATH="$_outdir" \
 		INSTALL_PATH="$_outdir"/boot \
 		|| return 1
_at_@ -190,7 +191,7 @@ _dev() {
 	cp "$srcdir"/config-$_flavor.${CARCH} "$dir"/.config
 	echo "-$pkgrel-$_flavor" > "$dir"/localversion-alpine \
 		|| return 1
-	make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="${CC:-gcc}" \
+	make -j1 -C "$srcdir"/linux-$_kernver O="$dir" ARCH="$_carch" HOSTCC="$HOSTCC" \
 		silentoldconfig prepare modules_prepare scripts
 
 	# remove the stuff that points to real sources. we want 3rd party
-- 
2.15.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Jan 18 2018 - 16:15:33 GMT