From 0a307ce759a8c2d50a0a4e3175c799d3ec6c3259 Mon Sep 17 00:00:00 2001 From: jammyjellyfish Date: Sun, 16 Apr 2023 17:49:00 +0800 Subject: [PATCH] Support specify CC --- 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 21b6324..236b36c 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,12 +1,13 @@ Name: libcap Version: 2.66 -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 Source0: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz Patch0: libcap-buildflags.patch +Patch1: 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.66-2 +- Support specify CC + * Mon Jan 30 2023 wangyunjia - 2.66-1 - update version to 2.66 diff --git a/support-specify-cc.patch b/support-specify-cc.patch new file mode 100644 index 0000000..699feef --- /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