!59 [sync] PR-58: Support build with clang

From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
This commit is contained in:
openeuler-ci-bot 2024-03-21 09:16:24 +00:00 committed by Gitee
commit 1a2cca9a26
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 17 additions and 1 deletions

View File

@ -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 <jammyjellyfish255@outlook.com> - 2.69-2
- Support specify CC
* Thu Jul 20 2023 wangyunjia <yunjia.wang@huawei.com> - 2.69-1
- update version to 2.69

12
support-specify-cc.patch Normal file
View File

@ -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