From c2176f219f09d89226f0177d5a0278ca6bead299 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Wed, 28 Dec 2022 12:33:00 -0800 Subject: [PATCH] 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. --- data/macros.rust | 1 + 1 file changed, 1 insertion(+) diff --git a/data/macros.rust b/data/macros.rust index efa46a3..9aa24a8 100644 --- a/data/macros.rust +++ b/data/macros.rust @@ -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}}