Subject: [alpine-aports] [PATCH 1/2] main/linux-vanilla: remap mips64 arch

From: Daniel Sabogal <[email-masked]>
Date: Thu, 18 Jan 2018 16:15:32 -0500

---
 main/linux-vanilla/APKBUILD | 1 +
 1 file changed, 1 insertion(+)

diff --git a/main/linux-vanilla/APKBUILD b/main/linux-vanilla/APKBUILD
index f763970256..88dd55bd41 100644
--- a/main/linux-vanilla/APKBUILD
+++ b/main/linux-vanilla/APKBUILD
@@ -58,6 +58,7 @@ _carch=${CARCH}
 case "$_carch" in
 aarch64*) _carch="arm64" ;;
 arm*) _carch="arm" ;;
+mips*) _carch="mips" ;;
 ppc*) _carch="powerpc" ;;
 s390*) _carch="s390" ;;
 esac
-- 
2.15.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Daniel Sabogal <[email-masked]>
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
@@ -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
 }
@@ -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
@@ -146,6 +146,7 @@ _package() {
 	esac
 
 	make -j1 modules_install $_install \
+		ARCH="$_carch" \
 		INSTALL_MOD_PATH="$_outdir" \
 		INSTALL_PATH="$_outdir"/boot \
 		|| return 1
@@ -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

---