From fb93b169515aa7a56d9b9e02f1d9ef5eda0ae838 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 11 May 2018 16:12:33 +0200 Subject: [PATCH] Inherit compiler flags in the original order --- glibc.spec | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/glibc.spec b/glibc.spec index a357a62..0becb90 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,6 +1,6 @@ %define glibcsrcdir glibc-2.27-37-g39071a5539 %define glibcversion 2.27 -%define glibcrelease 10%{?dist} +%define glibcrelease 11%{?dist} # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -823,20 +823,14 @@ df GCC=gcc GXX=g++ -# True if the compiler flag in the first argument is listed in -# redhat-rpm-config. -rpm_has_compiler_flag () -{ - echo " $RPM_OPT_FLAGS $RPM_LD_FLAGS " | grep -q -F " $1 " -} - # Propagates the listed flags to BuildFlags if supplied by redhat-rpm-config. BuildFlags="-O2 -g" rpm_inherit_flags () { + local reference=" $* " local flag - for flag in "$@" ; do - if rpm_has_compiler_flag "$flag" ; then + for flag in $RPM_OPT_FLAGS $RPM_LD_FLAGS ; do + if echo "$reference" | grep -q -F " $flag " ; then BuildFlags="$BuildFlags $flag" fi done @@ -1969,6 +1963,9 @@ fi %endif %changelog +* Fri May 11 2018 Florian Weimer - 2.27-11 +- Inherit compiler flags in the original order + * Fri May 11 2018 Florian Weimer - 2.27-10 - Inherit the -mstackrealign flag if it is set