From f080fb9562ed7492b14ed5897263441f364e31fa Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Tue, 3 Jan 2023 10:35:43 -0800 Subject: [PATCH] Enable frame pointers by default --- buildflags.md | 11 +++++++++-- macros | 4 ++-- redhat-rpm-config.spec | 5 ++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/buildflags.md b/buildflags.md index 46e8401..1f2c296 100644 --- a/buildflags.md +++ b/buildflags.md @@ -304,8 +304,15 @@ to `%build_ldfags`, but the linker script would still be generated. ### Frame pointers -Frame pointers will be included by default if the `%_include_frame_pointers` -macro is defined. +Frame pointers will be included by default via the `%_include_frame_pointers` +macro. To opt out, the best way is to undefine the macro. Include this in the +spec file: + + %undefine _include_frame_pointers + +Note that opting out might still result in frame pointers being included on +architectures where they are part of the ABI (e.g. aarch64) depending on +compiler defaults. ### Post-build ELF object processing diff --git a/macros b/macros index f86c8e8..be3630d 100644 --- a/macros +++ b/macros @@ -336,8 +336,8 @@ print(result) # Always include frame pointer information # https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer -# Use "%define _include_frame_pointers 1" to enable. -#%_include_frame_pointers 1 +# Use "%undefine _include_frame_pointers" to disable. +%_include_frame_pointers 1 %_frame_pointers_cflags %{?_include_frame_pointers:-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer} # Fail linking if there are undefined symbols. Required for proper diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index c8dccf4..00deb7b 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -4,7 +4,7 @@ # 2) When making changes, increment the version (in baserelease) by 1. # rpmdev-bumpspec and other tools update the macro below, which is used # in Version: to get the desired effect. -%global baserelease 238 +%global baserelease 239 Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config @@ -221,6 +221,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %doc buildflags.md %changelog +* Wed Jan 4 2023 Davide Cavalca - 239-1 +- Enable frame pointers by default + * Tue Jan 3 2023 Miro HronĨok - 238-1 - Set %%source_date_epoch_from_changelog to 1 - https://fedoraproject.org/wiki/Changes/ReproducibleBuildsClampMtimes