Remove package ELF note from the extension LDFLAGS

Related: https://bugzilla.redhat.com/2043092
This commit is contained in:
Miro Hrončok 2022-01-20 18:04:31 +01:00
parent 57edf0cad7
commit 357f950c28
2 changed files with 7 additions and 2 deletions

3
macros
View File

@ -104,7 +104,8 @@ local name = rpm.expand("%{1}")
local value = " " .. rpm.expand("%{build_" .. name .. "}") local value = " " .. rpm.expand("%{build_" .. name .. "}")
local specs_pattern = "%s+-specs=[^%s]+" local specs_pattern = "%s+-specs=[^%s]+"
local lto_flags_pattern = rpm.expand("%{?_lto_cflags}"):gsub("[%-%.]", "%%%1") local lto_flags_pattern = rpm.expand("%{?_lto_cflags}"):gsub("[%-%.]", "%%%1")
local result = value:gsub(specs_pattern, " "):gsub(lto_flags_pattern, "") local package_note_flags_pattern = "%-Wl,%S*package_note%S*"
local result = value:gsub(specs_pattern, " "):gsub(lto_flags_pattern, ""):gsub(package_note_flags_pattern, "")
print(result) print(result)
} }

View File

@ -6,7 +6,7 @@
Summary: Red Hat specific rpm configuration files Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config Name: redhat-rpm-config
Version: 209 Version: 210
Release: 1%{?dist} Release: 1%{?dist}
# No version specified. # No version specified.
License: GPL+ License: GPL+
@ -191,6 +191,10 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
%doc buildflags.md %doc buildflags.md
%changelog %changelog
* Thu Jan 20 2022 Miro Hrončok <mhroncok@redhat.com> - 210-1
- Remove package ELF note from the extension LDFLAGS
- Related: rhbz#2043092
* Thu Jan 13 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 209-1 * Thu Jan 13 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 209-1
- Add package ELF note to the default LDFLAGS - Add package ELF note to the default LDFLAGS