Inherit compiler flags in the original order

This commit is contained in:
Florian Weimer 2018-05-11 16:12:33 +02:00
parent 2fcfa6890c
commit 890019ecf2

View File

@ -703,20 +703,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
@ -1850,6 +1844,7 @@ fi
* Fri May 11 2018 Florian Weimer <fweimer@redhat.com> - 2.27.9000-17
- Avoid exporting some Sun RPC symbols with default versions (#1577210)
- Inherit the -mstackrealign flag if it is set
- Inherit compiler flags in the original order
- Auto-sync with upstream branch master,
commit 89aacb513eb77549a29df2638913a0f8178cf3f5.