diff --git a/0005-support-clang-build.patch b/0005-support-clang-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..d0b847cf2aa6a8452be0b0b756e2df5cff7b7cee --- /dev/null +++ b/0005-support-clang-build.patch @@ -0,0 +1,22 @@ +From 09f108146862b09a08ff5fc56f983c1f76cea684 Mon Sep 17 00:00:00 2001 +From: luofeng +Date: Tue, 26 Mar 2024 22:05:39 +0800 +Subject: [PATCH] support clang build + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 0d35d4f..1829c0d 100755 +--- a/Makefile ++++ b/Makefile +@@ -36,4 +36,4 @@ INCDIR=/usr/include/crash + all: trace.so + + trace.so: $(INCDIR)/defs.h trace.c +- gcc $(RPM_OPT_FLAGS) -Wall -I$(INCDIR) -nostartfiles -shared -rdynamic -Wl,-soname,trace.so -o trace.so trace.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) ++ $(CC) $(RPM_OPT_FLAGS) -Wall -I$(INCDIR) -nostartfiles -shared -rdynamic -Wl,-soname,trace.so -o trace.so trace.c -fPIC -D$(TARGET) $(TARGET_CFLAGS) +-- +2.19.1 + diff --git a/crash-trace-command.spec b/crash-trace-command.spec index 4d23061ec3a1f1afb74f1f193cdb69479af03708..ca8fc5f059011295f39a95fdfa0406a4695bef29 100644 --- a/crash-trace-command.spec +++ b/crash-trace-command.spec @@ -1,6 +1,6 @@ Name: crash-trace-command Version: 3.0 -Release: 3 +Release: 4 Summary: Crash utility's trace extension module License: GPLv2 Source: crash-trace-command-%{version}.tar.gz @@ -13,6 +13,7 @@ Patch0001: 0001-Makefile-set-DT_SONAME-to-trace.so.patch Patch0002: 0002-Makefile-fix-build-failure-on-aarch64-and-ppc64le.patch Patch0003: 0001-crash-trace-command-3.0-add-loongarch64-support.patch Patch0004: 0003-carsh-trace-command-3.0-add-riscv64-support.patch +Patch0005: 0005-support-clang-build.patch %description This package provides a trace extension module for the crash utility, @@ -28,6 +29,7 @@ allowing it to read ftrace data from a core dump file. %ifarch riscv64 %patch0004 -p1 %endif +%patch0005 -p1 %build make @@ -42,6 +44,9 @@ cp %{_builddir}/crash-trace-%{version}/trace.so %{buildroot}%{_libdir}/crash/ext %doc COPYING %changelog +* Fri Mar 1 2024 luofeng - 3.0-4 +- support clang build + * Fri Jul 7 2023 EastDong - 3.0-3 - add riscv64 support