crash-gcore-command/0003-support-clang-build.patch
luofeng14 2b7588e49f support clang build
Signed-off-by: luofeng14 <luofeng13@huawei.com>
(cherry picked from commit 182f4ea456b0099ce8821bfa5f0cc3bf65519694)
2024-03-29 10:48:57 +08:00

31 lines
1.1 KiB
Diff

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