From 6cce360fd26fe9d8c06d31a4fb43eb2cbd74e1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 17 May 2022 10:53:26 +0200 Subject: [PATCH] Remove a tab character from the definition of %__global_compiler_flags From https://bugzilla.redhat.com/2083296: > The issue is that some packages break up the flags at spaces, > in order to look for specific flags or to add flags of their own. > The z3 package, for example, has some python code that does this: > > def exec_cmd(cmd): > if isinstance(cmd, str): > cmd = cmd.split(' ') > ... > > The result is one of the commands in the list consists of a single tab character. > When that is passed to the compiler, the compiler does not like it at all. --- macros | 2 +- redhat-rpm-config.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/macros b/macros index f340a30..be51cd4 100644 --- a/macros +++ b/macros @@ -356,7 +356,7 @@ print(result) %_clang_extra_flags --start-no-unused-arguments -fno-openmp-implicit-rpath --end-no-unused-arguments -%__global_compiler_flags %{_general_options} %{_warning_options} %{_preprocessor_defines} %{_hardened_cflags} %{_annotation_cflags} %{_legacy_options} %[ "%{toolchain}" == "clang" ? "%{_clang_extra_flags}" : "%{nil}" ] +%__global_compiler_flags %{_general_options} %{_warning_options} %{_preprocessor_defines} %{_hardened_cflags} %{_annotation_cflags} %{_legacy_options} %[ "%{toolchain}" == "clang" ? "%{_clang_extra_flags}" : "%{nil}" ] # Automatically trim changelog entries after 2 years %_changelog_trimage %{expr:2*365*24*60*60} diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index cbb2850..50a2de1 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -7,7 +7,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config Version: 219 -Release: 1%{?dist} +Release: 2%{?dist} # No version specified. License: GPL+ URL: https://src.fedoraproject.org/rpms/redhat-rpm-config @@ -216,6 +216,10 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %doc buildflags.md %changelog +* Tue May 17 2022 Miro HronĨok - 219-2 +- Remove a tab character from the definition of %%__global_compiler_flags +- Fixes: rhbz#2083296 + * Tue May 10 2022 Mikolaj Izdebski - 219-1 - Add java_arches macro