From b6b865f3d5263df42ce6c530e247cc663b881ce4 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Wed, 26 May 2021 21:36:44 +0200 Subject: [PATCH] Disable annobin on armv7hl On armv7hl, enabling annobin can in some cases lead to corrupt unwind information in generated object files: https://bugzilla.redhat.com/show_bug.cgi?id=1951492 The root-cause of this is still unclear and until this is sorted out, it is best to disable annobin on the architecture. --- macros | 6 +++++- redhat-rpm-config.spec | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/macros b/macros index b07e194..802d00d 100644 --- a/macros +++ b/macros @@ -317,12 +317,16 @@ print(result) # Add extra information to binary objects created by the compiler: # https://pagure.io/fesco/issue/1780 (accepted on 2017-10-30) +# ...except on armv7hl, which has an issue whose root-cause isn't +# clear yet: https://bugzilla.redhat.com/show_bug.cgi?id=1951492 # Use "%undefine _annotated_build" to disable. %_annotated_build 1 %_annobin_gcc_plugin -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 # The annobin plugin is not built for clang yet %_annobin_clang_plugin %dnl-fplugin=/usr/lib64/clang/`clang -dumpversion`/lib/annobin.so -%_annotation_cflags %{?_annotated_build:%{expand:%%{_annobin_%{toolchain}_plugin}}} +%_annotation_plugin %{?_annotated_build:%{expand:%%{_annobin_%{toolchain}_plugin}}} +%_annotation_cflags %[ "%{_target_cpu}" == "armv7hl" ? "" : "%{_annotation_plugin}" ] + # Fail linking if there are undefined symbols. Required for proper # ELF symbol versioning support. Disabled by default. diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index b5ac074..d751e11 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 184 +Version: 185 Release: 1%{?dist} # No version specified. License: GPL+ @@ -220,6 +220,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Wed May 26 2021 Arjun Shankar - 185-1 +- Disable annobin on armv7hl + * Mon Apr 12 2021 David Benoit - 184-1 - Change 'Requires: annobin' to 'Requires: annobin-plugin-gcc'.