From cf93290e0922a8920946544fc115dbd1c591450a Mon Sep 17 00:00:00 2001 From: s Date: Fri, 8 Sep 2023 09:17:25 +0800 Subject: [PATCH] support specify compiler --- 0003-support-specify-compiler.patch | 27 +++++++++++++++++++++++++++ memleax.spec | 6 +++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 0003-support-specify-compiler.patch diff --git a/0003-support-specify-compiler.patch b/0003-support-specify-compiler.patch new file mode 100644 index 0000000..ab72864 --- /dev/null +++ b/0003-support-specify-compiler.patch @@ -0,0 +1,27 @@ +diff -u -r memleax-1.1.1/configure memleax-1.1.1/configure +--- memleax-1.1.1/configure 2023-09-08 09:12:41.000000000 +0800 ++++ memleax-1.1.1/configure 2023-09-08 09:13:11.000000000 +0800 +@@ -112,12 +112,12 @@ + return 0; + } + EOF +- if ! cc -M $CFLAGS $cflags tmp.c >/dev/null 2>&1 ; then ++ if ! $CC -M $CFLAGS $cflags tmp.c >/dev/null 2>&1 ; then + echo "$lib-devel is missing." + rm -f tmp.c + return 1 + fi +- if ! cc $CFLAGS $cflags tmp.c -o tmp $LDFLAGS $LDLIBS $ldflags >/dev/null 2>&1 ; then ++ if ! $CC $CFLAGS $cflags tmp.c -o tmp $LDFLAGS $LDLIBS $ldflags >/dev/null 2>&1 ; then + echo "$lib is missing." + rm -f tmp.c tmp + return 1 +@@ -193,7 +193,7 @@ + + EOF + +-cc -MM $CFLAGS $SOURCES >> Makefile ++$CC -MM $CFLAGS $SOURCES >> Makefile + + # done + echo 'done.' diff --git a/memleax.spec b/memleax.spec index d9bd01a..e60ce36 100644 --- a/memleax.spec +++ b/memleax.spec @@ -1,12 +1,13 @@ Name: memleax Version: 1.1.1 -Release: 7 +Release: 8 Summary: Memory lead detection tool License: GPLv2 URL: https://github.com/WuBingzheng/memleax Source0: https://github.com/WuBingzheng/memleax/archive/v%{version}.tar.gz#/memleax-%{version}.tar.gz Patch0: 0001-add-loongarch64-support.patch Patch1: 0002-add-riscv64-support.patch +Patch2: 0003-support-specify-compiler.patch BuildRequires: make libunwind-devel elfutils-devel gcc @@ -49,6 +50,9 @@ make install DESTDIR="%{buildroot}" %{_mandir}/man1/%{name}.1* %changelog +* Fri Sep 08 2023 yoo - 1.1.1-8 +- support specify compiler + * Fri Jun 30 2023 zhangxiang - 1.1.1-7 - add riscv64 support -- Gitee