support clang build
Signed-off-by: luofeng14 <luofeng13@huawei.com> (cherry picked from commit 182f4ea456b0099ce8821bfa5f0cc3bf65519694)
This commit is contained in:
parent
64712f16e3
commit
2b7588e49f
30
0003-support-clang-build.patch
Normal file
30
0003-support-clang-build.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From e190d749ee2d77acea0feadd628a793f9648c2c8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: luofeng <luofeng13@huawei.com>
|
||||||
|
Date: Thu, 28 Mar 2024 16:29:04 +0800
|
||||||
|
Subject: [PATCH] support clang build
|
||||||
|
|
||||||
|
---
|
||||||
|
src/gcore.mk | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gcore.mk b/src/gcore.mk
|
||||||
|
index 9f3d56e..7da33c5 100644
|
||||||
|
--- a/src/gcore.mk
|
||||||
|
+++ b/src/gcore.mk
|
||||||
|
@@ -112,11 +112,11 @@ gcore.so: gcore.c $(INCDIR)/defs.h
|
||||||
|
echo "gcore: architecture not supported"; \
|
||||||
|
else \
|
||||||
|
make -f gcore.mk $(GCORE_OFILES) && \
|
||||||
|
- gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) $(ARCH_CFLAGS) -nostartfiles -shared -rdynamic $(GCORE_OFILES) -Wl,-soname,$@ -o $@ $< ; \
|
||||||
|
+ $(CC) $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) $(ARCH_CFLAGS) -nostartfiles -shared -rdynamic $(GCORE_OFILES) -Wl,-soname,$@ -o $@ $< ; \
|
||||||
|
fi;
|
||||||
|
|
||||||
|
%.o: %.c $(INCDIR)/defs.h
|
||||||
|
- gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) $(ARCH_CFLAGS) -c -o $@ $<
|
||||||
|
+ $(CC) $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) $(ARCH_CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f gcore.so
|
||||||
|
--
|
||||||
|
2.19.1
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
%global reponame crash-gcore
|
%global reponame crash-gcore
|
||||||
Name: crash-gcore-command
|
Name: crash-gcore-command
|
||||||
Version: 1.6.4
|
Version: 1.6.4
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Command of Gcore for Crash utility
|
Summary: Command of Gcore for Crash utility
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -17,6 +17,7 @@ Patch1: 0001-add-stdbool.h-to-fix-build-error.patch
|
|||||||
%ifarch riscv64
|
%ifarch riscv64
|
||||||
Patch2: 0002-add-riscv64-support.patch
|
Patch2: 0002-add-riscv64-support.patch
|
||||||
%endif
|
%endif
|
||||||
|
Patch3: 0003-support-clang-build.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The crash-gcore-command packages contain an extension module for the crash utility
|
The crash-gcore-command packages contain an extension module for the crash utility
|
||||||
@ -38,6 +39,9 @@ install -D %{_builddir}/%{reponame}-%{version}/src/gcore.so %{buildroot}%{_libdi
|
|||||||
%{_libdir}/crash/extensions/gcore.so
|
%{_libdir}/crash/extensions/gcore.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 1 2024 luofeng <luofeng13@huawei.com> - 1.6.4-3
|
||||||
|
- support clang build
|
||||||
|
|
||||||
* Wed Jul 12 2023 EastDong <xudong23@iscas.ac.cn> - 1.6.4-2
|
* Wed Jul 12 2023 EastDong <xudong23@iscas.ac.cn> - 1.6.4-2
|
||||||
- add riscv64 support
|
- add riscv64 support
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user