From faa4667c8b2718fa7c0e2803ee3be3332be626ad Mon Sep 17 00:00:00 2001 From: hengwu Date: Tue, 2 Sep 2025 01:48:09 +0800 Subject: [PATCH] Enhance support for gcc compilation parameter -I Signed-off-by: hengwu --- ...port-for-gcc-compilation-parameter-I.patch | 30 +++++++++++++++++++ libcareplus.spec | 7 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 0001-Enhance-support-for-gcc-compilation-parameter-I.patch diff --git a/0001-Enhance-support-for-gcc-compilation-parameter-I.patch b/0001-Enhance-support-for-gcc-compilation-parameter-I.patch new file mode 100644 index 0000000..9eb965f --- /dev/null +++ b/0001-Enhance-support-for-gcc-compilation-parameter-I.patch @@ -0,0 +1,30 @@ +From fba9523925ac10b1aec2fab7baaad415bde5c869 Mon Sep 17 00:00:00 2001 +From: hengwu +Date: Mon, 2 Sep 2024 17:03:57 +0800 +Subject: Enhance support for gcc compilation parameter -I + +Add parse of -I gcc param. + +Signed-off-by: hengwu +--- + src/kpatch_cc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/kpatch_cc.c b/src/kpatch_cc.c +index 0f68328..b7dd84f 100644 +--- a/src/kpatch_cc.c ++++ b/src/kpatch_cc.c +@@ -367,6 +367,10 @@ static void init(int argc_, const char **argv_) + + + switch (arg[1]) { ++ case 'I': ++ if (arg[2] == '\0') ++ i++; ++ continue; + case 'x': + if (arg[2] == '\0') + i++; +-- +2.33.0 + diff --git a/libcareplus.spec b/libcareplus.spec index 3692ecb..0c71ea4 100644 --- a/libcareplus.spec +++ b/libcareplus.spec @@ -3,12 +3,14 @@ Version: 1.0.2 Name: libcareplus Summary: LibcarePlus tools -Release: 1 +Release: 2 Group: Applications/System License: GPLv2 Url: https://gitee.com/openeuler/libcareplus Source0: https://gitee.com/openeuler/libcareplus/releases/download/v%{version}/%{name}-%{version}.tar.gz +Patch1: 0001-Enhance-support-for-gcc-compilation-parameter-I.patch + BuildRequires: elfutils-libelf-devel libunwind-devel gcc systemd Requires: binutils elfutils elfutils-libelf-devel libunwind-devel @@ -146,6 +148,9 @@ exit 0 %endif %changelog +* Tue Sep 2 2025 hengwu 1.0.2-2 +- Enhance support for gcc compilation parameter -I + * Wed May 08 2024 laokz 1.0.2-1 - libcareplus update to version 1.0.2 -- Gitee