diff --git a/crash-gcore-command.spec b/crash-gcore-command.spec index 982404cc1283137dcc6f4801916cdffc01679e68..47800f9da875c352c21afe4e806bd47b627f36e6 100644 --- a/crash-gcore-command.spec +++ b/crash-gcore-command.spec @@ -1,12 +1,13 @@ %global reponame crash-gcore Name: crash-gcore-command Version: 1.6.3 -Release: 1 +Release: 2 Summary: Command of Gcore for Crash utility License: GPLv2 URL: http://people.redhat.com/anderson/extensions/%{name}-%{version}.tar.gz Source: %{name}-%{version}.tar.gz +Patch0: support-specify-cc.patch Buildroot: %{_tmppath}/%{name}-root BuildRequires: zlib-devel lzo-devel snappy-devel crash-devel >= 5.1.5 gcc @@ -32,6 +33,9 @@ install -D %{_builddir}/%{reponame}-%{version}/src/gcore.so %{buildroot}%{_libdi %{_libdir}/crash/extensions/gcore.so %changelog +* Fri Apr 14 2023 jammyjellyfish - 1.6.3-2 +- Support specify CC + * Tue Jan 18 2022 SimpleUpdate Robot - 1.6.3-1 - Upgrade to version 1.6.3 diff --git a/support-specify-cc.patch b/support-specify-cc.patch new file mode 100644 index 0000000000000000000000000000000000000000..7ffad6ae608cafe575a64c13a45c70ed64008c93 --- /dev/null +++ b/support-specify-cc.patch @@ -0,0 +1,26 @@ +diff -up crash-gcore-1.6.3/Makefile.orig crash-gcore-1.6.3/Makefile +diff -up crash-gcore-1.6.3/src/gcore.mk.orig crash-gcore-1.6.3/src/gcore.mk +--- crash-gcore-1.6.3/src/gcore.mk.orig 2023-04-14 18:26:33.886844165 +0800 ++++ crash-gcore-1.6.3/src/gcore.mk 2023-04-14 18:28:05.019145042 +0800 +@@ -17,6 +17,7 @@ DATE=7 Dec 2021 + PERIOD=2010, 2011, 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020, 2021 + + ARCH=UNSUPPORTED ++CC?=gcc + + ifeq ($(shell arch), i686) + TARGET=X86 +@@ -112,11 +113,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