linux-samsung-m20lte: Don't override CROSS_COMPILE

Setting this to an empty string will result in the kernel invoking just
"ld" for linking, rather than aarch64-alpine-linux-musl-ld. When
building with GCC and linking with BFD, we still need to rely on
pmbootstrap to set CROSS_COMPILE appropriately, overriding it will break
cross compilation.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8622>
This commit is contained in:
Aelin 2026-05-24 02:50:17 +02:00 committed by The Friendly Meow (merge) Bot
parent 6d7a70344b
commit b38d810c74
No known key found for this signature in database
2 changed files with 28 additions and 2 deletions

View file

@ -4,7 +4,7 @@
maintainer="Diego Stocco <diegostocco.2008@gmail.com>"
pkgname=linux-samsung-m20lte
pkgver=4.4.177
pkgrel=0
pkgrel=1
_commit="339a04eabab9310ad9f6039831f6834d7f9d3c2b"
pkgdesc="Samsung Galaxy M20 kernel fork"
arch="aarch64"
@ -27,6 +27,7 @@ _config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/android_kernel_samsung_universal7904/archive/$_commit.tar.gz
$_config
cross-compile.patch
fix-check-lxdialog.patch
fix-scsc-kconfig.patch
fix-decon.patch
@ -45,7 +46,7 @@ prepare() {
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CROSS_COMPILE= CC="${CC:-gcc}" \
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# deviceinfo_bootimg_qcdt
@ -75,6 +76,7 @@ package() {
sha512sums="
663f7cff6dee546104a34f38ba27f89211ef40514e4ebdf63d4bc60a523f31d831e349060b70cc407498a33044ced3d0e806b8325c07f7b5a3b829d610bef490 linux-samsung-m20lte-339a04eabab9310ad9f6039831f6834d7f9d3c2b.tar.gz
93c5aa1ad25a32a11aaba114ad16dc4a31595b8466594c3c76ae362db590a8b0c0f5d0a160b242fe5275052e9e9b26fa1367959441065e7127c325a5dc19367a config-samsung-m20lte.aarch64
4bff19e4711dc5363520ae2d5f165e82d9588d51858a3f1ea48f77fde5a1674ee23bbed8a270a11ec48c0877d27cc28a393ba58ba87f8f2c97fd6abe8495efc3 cross-compile.patch
182be3c596b9cc267ac108d7cf03fc8c328ccc6b36770800e4dcedea8d1bb65e3f5eacf590c2948f58b1418cc60a1670ba77dde8c259e428d158c31b6e1dbaf5 fix-check-lxdialog.patch
2038a0e7b3a076e83e4a8fa2e5d35650c52f947985ca58310aaf94211756eef1635bb3c8e047a77ecc0a69de55f49be37081bfd570e49031b2397a9d6de87285 fix-scsc-kconfig.patch
88a5ef18d9eb31e6d80317925907651229529cd41f8b181b61c14ff56b340341c8ff5c95ab0dd9562b9575d4e206623e7dc039a9eb6b34c455165878df63cd86 fix-decon.patch

View file

@ -0,0 +1,24 @@
From 38c0b96c7b8b636f245faac5bfae7859a2e0a81d Mon Sep 17 00:00:00 2001
From: Aelin <aelin@postmarketos.org>
Date: Sun, 24 May 2026 03:00:52 +0200
Subject: [PATCH] Don't use bundled cross toolchain
---
Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 735496c9..0880e9d5 100755
--- a/Makefile
+++ b/Makefile
@@ -255,7 +255,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
ARCH ?= arm64
-CROSS_COMPILE ?= $(srctree)/toolchain/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
SRCARCH := $(ARCH)
--
2.54.0