From efcbeda7bc4a5759b0322b7ea5e1361fd8d1ce5121b5609fb2c4529dc64c86b9 Mon Sep 17 00:00:00 2001 From: Petr Tesarik Date: Thu, 29 May 2025 10:19:02 +0200 Subject: [PATCH] Fix build for riscv64 and 32-bit arm Add the missing definitions for two more supported targets. Signed-off-by: Petr Tesarik --- crash-trace-fix-arm.patch | 17 +++++++++++++++++ crash-trace-fix-riscv64.patch | 17 +++++++++++++++++ crash-trace.changes | 6 ++++++ crash-trace.spec | 2 ++ 4 files changed, 42 insertions(+) create mode 100644 crash-trace-fix-arm.patch create mode 100644 crash-trace-fix-riscv64.patch diff --git a/crash-trace-fix-arm.patch b/crash-trace-fix-arm.patch new file mode 100644 index 0000000..420a33d --- /dev/null +++ b/crash-trace-fix-arm.patch @@ -0,0 +1,17 @@ +--- + Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/Makefile ++++ b/Makefile +@@ -30,6 +30,10 @@ ifeq ($(shell arch), aarch64) + TARGET=ARM64 + TARGET_CFLAGS= + endif ++ifeq ($(patsubst arm%,arm,$(shell arch)), arm) ++ TARGET=ARM ++ TARGET_CFLAGS= ++endif + + INCDIR=/usr/include/crash + diff --git a/crash-trace-fix-riscv64.patch b/crash-trace-fix-riscv64.patch new file mode 100644 index 0000000..75a09a6 --- /dev/null +++ b/crash-trace-fix-riscv64.patch @@ -0,0 +1,17 @@ +--- + Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/Makefile ++++ b/Makefile +@@ -34,6 +34,10 @@ ifeq ($(patsubst arm%,arm,$(shell arch)) + TARGET=ARM + TARGET_CFLAGS= + endif ++ifeq ($(shell arch), riscv64) ++ TARGET=RISCV64 ++ TARGET_CFLAGS= ++endif + + INCDIR=/usr/include/crash + diff --git a/crash-trace.changes b/crash-trace.changes index ab79bac..dde8b10 100644 --- a/crash-trace.changes +++ b/crash-trace.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 29 08:10:33 UTC 2025 - Petr Tesařík + +- crash-trace-fix-arm.patch: Fix build for 32-bit Arm. +- crash-trace-fix-riscv64.patch: Fix build for RISCV64. + ------------------------------------------------------------------- Sat Nov 19 20:53:37 UTC 2022 - Petr Tesařík diff --git a/crash-trace.spec b/crash-trace.spec index 6fc8cad..bb55017 100644 --- a/crash-trace.spec +++ b/crash-trace.spec @@ -25,6 +25,8 @@ Group: Development/Tools/Debuggers URL: https://github.com/fujitsu/crash-trace Source: https://github.com/fujitsu/crash-trace/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch1: %{name}-fix-aarch64-ppc64le.patch +Patch2: %{name}-fix-arm.patch +Patch3: %{name}-fix-riscv64.patch BuildRequires: crash-devel Requires: trace-cmd -- 2.51.1