support clang build

(cherry picked from commit ea42ad79b2cba7ec73ef200a6043d0bac477f4e4)
This commit is contained in:
luofeng14 2024-04-05 16:35:23 +08:00 committed by openeuler-sync-bot
parent 9468b250b2
commit d05a38f5bf

View File

@ -1,6 +1,6 @@
Name: efivar
Version: 38
Release: 4
Release: 5
Summary: Tools and libraries to work with EFI variables
License: LGPL-2.1-only
URL: https://github.com/rhboot/%{name}
@ -41,7 +41,10 @@ Development titles to use libefivar must be included.
%build
export LDFLAGS="-flto-partition=none"
%make_build
%if "%{?toolchain}" == "clang"
%global make_opts CC=clang CXX=clang++
%endif
%make_build %{?make_opts}
%install
%make_install
@ -74,6 +77,12 @@ install -m 0644 src/abignore %{buildroot}%{_includedir}/efivar/.abignore
%{_mandir}/man3/*
%changelog
* Mon Apr 1 2024 luofeng13 <luofeng13@huawei.com> - 38-5
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:support clang build
* Wed Mar 13 2024 zhouyihang <zhouyihang3@h-partners.com> - 38-4
- Type:bugfix
- ID:NA