Use _include_frame_pointers

This commit is contained in:
eabdullin 2024-07-04 17:51:49 +03:00
parent b675a19ea4
commit e4cae60bb5

View File

@ -5,10 +5,12 @@
# Needs only for first build, because we should have right arch names
%if 0%{?x86_64_v2} == 1
%global _build_name_fmt %%{ARCH}_v2/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_v2.rpm
%global _build_name_fmt %{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}_v2.rpm
%global _rpmfilename %{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}_v2.rpm
%endif
%if 0%{?x86_64_fp} == 1
%global _build_name_fmt %%{ARCH}_fp/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_fp.rpm
%global _build_name_fmt %{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}_fp.rpm
%global _rpmfilename %{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}_fp.rpm
%endif
@ -316,14 +318,16 @@ install -p -m 0644 %{SOURCE600} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
%if 0%{?x86_64_v2} == 1
mkdir -p %{buildroot}%{_sysconfdir}/rpm
echo '%%_build_name_fmt %%{ARCH}_v2/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_v2.rpm' > %{buildroot}%{_sysconfdir}/rpm/macros.arch_v2
echo '%%_rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_v2.rpm' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_v2
echo '%%x86_64_v2 1' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_v2
echo '%%__cflags_arch_x86_64_level -v2' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_v2
%endif
%if 0%{?x86_64_fp} == 1
mkdir -p %{buildroot}%{_sysconfdir}/rpm
echo '%%_build_name_fmt %%{ARCH}_fp/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_fp.rpm' > %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
echo '%%_rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_fp.rpm' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
echo '%%x86_64_fp 1' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
echo '%%optflags %%{optflags} -fno-omit-frame-pointer' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
echo '%%_include_frame_pointers 1' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
%endif