All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernd Kuhls <bernd@kuhls.net>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH 1/1] package/kodi: add upstream patch to fix build on s390, mark unavailable on m68k
Date: Tue, 23 Jun 2026 07:17:25 +0200	[thread overview]
Message-ID: <20260623051725.4526-1-bernd@kuhls.net> (raw)

Build errors were found by the Gitlab pipelines with these defconfigs:

- bootlin-m68k-68040-uclibc
  CMake Error at cmake/scripts/linux/ArchSetup.cmake:50 (message):
    Unknown CPU: m68k

- bootlin-s390x-z13-glibc
  CMake Error at cmake/scripts/linux/ArchSetup.cmake:50 (message):
    Unknown CPU: s390x

Backport an upstream commit from the upcoming Piers branch to fix the
restriction in ArchSetup.cmake.

This caused a different build error on m68k later on:

/builds/bkuhls/buildroot/br-test-pkg/bootlin-m68k-68040-uclibc/build/kodi-21.3-Omega/xbmc/utils/MathUtils.h:142:5:
 error: unknown register name ‘st’ in ‘asm’
  142 |     __asm__ __volatile__ (

because m68k is not part of the list of archs to disable asm code:
https://github.com/xbmc/xbmc/blob/Omega/xbmc/utils/MathUtils.h#L26

Upstream rejected to add m68k there:
https://github.com/xbmc/xbmc/pull/22519
https://github.com/xbmc/xbmc/pull/22357#issuecomment-1368358471

so we disable m68k in BR2_PACKAGE_KODI_ARCH_SUPPORTS.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Gitlab pipelines passed:
https://gitlab.com/bkuhls/buildroot/-/commits/85ddd6b4f813e4cd7197a63037c3cb28b2c25691

 ...006-cmake-Set-ARCH-to-CPU-by-default.patch | 41 +++++++++++++++++++
 package/kodi/Config.in                        |  2 +
 2 files changed, 43 insertions(+)
 create mode 100644 package/kodi/0006-cmake-Set-ARCH-to-CPU-by-default.patch

diff --git a/package/kodi/0006-cmake-Set-ARCH-to-CPU-by-default.patch b/package/kodi/0006-cmake-Set-ARCH-to-CPU-by-default.patch
new file mode 100644
index 0000000000..c5bbbe9636
--- /dev/null
+++ b/package/kodi/0006-cmake-Set-ARCH-to-CPU-by-default.patch
@@ -0,0 +1,41 @@
+From 1695ba12380272056f369f434747839b2ae38d91 Mon Sep 17 00:00:00 2001
+From: fossdd <fossdd@pwned.life>
+Date: Sat, 22 Feb 2025 20:59:28 +0100
+Subject: [PATCH] [cmake] Set ARCH to CPU by default
+
+Reduces complexity of redundant architecture names and allows building
+for other architectures implicitly.
+
+Upstream: https://github.com/xbmc/xbmc/commit/1695ba12380272056f369f434747839b2ae38d91
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ cmake/scripts/linux/ArchSetup.cmake | 11 +----------
+ 1 file changed, 1 insertion(+), 10 deletions(-)
+
+diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake
+index ab142177c8..f29a870a1e 100644
+--- a/cmake/scripts/linux/ArchSetup.cmake
++++ b/cmake/scripts/linux/ArchSetup.cmake
+@@ -37,17 +37,8 @@ else()
+   elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64)
+     set(ARCH aarch64)
+     set(NEON True)
+-  elseif(CPU MATCHES riscv64)
+-    set(ARCH riscv64)
+-    set(NEON False)
+-  elseif(CPU MATCHES ppc64le)
+-    set(ARCH ppc64le)
+-    set(NEON False)
+-  elseif(CPU MATCHES loongarch64)
+-    set(ARCH loongarch64)
+-    set(NEON False)
+   else()
+-    message(SEND_ERROR "Unknown CPU: ${CPU}")
++    set(ARCH ${CPU})
+   endif()
+ endif()
+ 
+-- 
+2.47.3
+
diff --git a/package/kodi/Config.in b/package/kodi/Config.in
index 6f256ada43..08a7caae2c 100644
--- a/package/kodi/Config.in
+++ b/package/kodi/Config.in
@@ -4,6 +4,8 @@ config BR2_PACKAGE_KODI_ARCH_SUPPORTS
 	default y if BR2_PACKAGE_HOST_OPENJDK_BIN_ARCH_SUPPORTS
 	# i386: needs sse (see upstream PR 10351)
 	depends on !(BR2_i386 && !BR2_X86_CPU_HAS_SSE)
+	# m68k not supported upstream
+	depends on !BR2_m68k
 	depends on BR2_USE_MMU # libcdio, and others
 
 comment "kodi needs python3 w/ .py modules, a uClibc or glibc toolchain w/ C++, threads, wchar, dynamic library, gcc >= 9.x, host gcc >= 9.x"
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2026-06-23  5:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23  5:17 Bernd Kuhls [this message]
2026-08-20 22:18 ` [Buildroot] [PATCH 1/1] package/kodi: add upstream patch to fix build on s390, mark unavailable on m68k Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260623051725.4526-1-bernd@kuhls.net \
    --to=bernd@kuhls.net \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.