Make sure asm files are built with -fcf-protection

This should fix the annocheck failure.
This commit is contained in:
Nikita Popov 2022-09-12 15:03:13 +02:00
parent 4f449439ad
commit d6128c4ee5

View File

@ -9,7 +9,7 @@
Name: llvm-libunwind Name: llvm-libunwind
Version: %{libunwind_version}%{?rc_ver:~rc%{rc_ver}} Version: %{libunwind_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist} Release: 2%{?dist}
Summary: LLVM libunwind Summary: LLVM libunwind
License: ASL 2.0 or NCSA or MIT License: ASL 2.0 or NCSA or MIT
@ -65,6 +65,9 @@ Documentation for LLVM libunwind
%autosetup -n %{libunwind_srcdir} -p2 %autosetup -n %{libunwind_srcdir} -p2
%build %build
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
export ASMFLAGS=$CFLAGS
%cmake -GNinja \ %cmake -GNinja \
-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \ -DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
@ -126,6 +129,9 @@ rm %{buildroot}%{_pkgdocdir}/html/.buildinfo
%doc %{_pkgdocdir}/html %doc %{_pkgdocdir}/html
%changelog %changelog
* Mon Sep 12 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-2
- Make sure asm files are built with -fcf-protection
* Fri Sep 09 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-1 * Fri Sep 09 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-1
- Update to LLVM 15.0.0 - Update to LLVM 15.0.0