Add conditional support for always including frame pointers

If `%_include_frame_pointers` is defined, add
`-Cforce-frame-pointers=yes` to the compiler flags to ensure frame
pointers are always included.

This is in preparation for
https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer

See
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/230
for the corresponding implementation in redhat-rpm-config.
This commit is contained in:
Davide Cavalca 2022-12-28 12:33:00 -08:00
parent d9aa58b6cb
commit c2176f219f

View file

@ -10,6 +10,7 @@
-Copt-level=%rustflags_opt_level
-Cdebuginfo=%rustflags_debuginfo
-Ccodegen-units=%rustflags_codegen_units
%{?_include_frame_pointers:-Cforce-frame-pointers=yes}
-Clink-arg=-Wl,-z,relro
-Clink-arg=-Wl,-z,now
%{?_package_note_file:-Clink-arg=-Wl,-dT,%{_package_note_file}}