From 8ffdecd18056fab225056893017b3c26646c7257 Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Sun, 4 Feb 2024 07:49:45 +0000 Subject: [PATCH] Support specify CC Signed-off-by: luofeng14 (cherry picked from commit a693eb1380f3138627a01780b358266be9067412) --- libcap.spec | 6 +++++- support-specify-cc.patch | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 support-specify-cc.patch diff --git a/libcap.spec b/libcap.spec index ac47e5d..837f29e 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,6 @@ Name: libcap Version: 2.69 -Release: 1 +Release: 2 Summary: A library for getting and setting POSIX.1e draft 15 capabilities License: GPLv2 URL: https://sites.google.com/site/fullycapable @@ -8,6 +8,7 @@ Source0: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{n Patch0: libcap-buildflags.patch Patch1: backport-libcap-Ensure-the-XATTR_NAME_CAPS-is-define.patch +Patch2: support-specify-cc.patch BuildRequires: libattr-devel pam-devel perl-interpreter gcc @@ -70,6 +71,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_mandir}/man8/*.gz %changelog +* Sun Apr 16 2023 jammyjellyfish - 2.69-2 +- Support specify CC + * Thu Jul 20 2023 wangyunjia - 2.69-1 - update version to 2.69 diff --git a/support-specify-cc.patch b/support-specify-cc.patch new file mode 100644 index 0000000..3665656 --- /dev/null +++ b/support-specify-cc.patch @@ -0,0 +1,12 @@ +diff -up libcap-2.66/Make.Rules.orig2 libcap-2.66/Make.Rules +--- libcap-2.66/Make.Rules.orig2 2023-04-16 17:46:55.922279005 +0800 ++++ libcap-2.66/Make.Rules 2023-04-16 17:46:13.518097014 +0800 +@@ -66,7 +66,7 @@ DEFINES := -D_LARGEFILE64_SOURCE -D_FILE + SYSTEM_HEADERS = /usr/include + + SUDO := sudo +-CC := $(CROSS_COMPILE)gcc ++CC ?= $(CROSS_COMPILE)gcc + LD := $(CC) -Wl,-x -shared + AR := $(CROSS_COMPILE)ar + RANLIB := $(CROSS_COMPILE)ranlib -- Gitee