From a2eb94542ef19d3c8516c56b7b49a1302ac1211e Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 31 Aug 2014 20:01:54 +0300 Subject: [PATCH] config/functions: fix strip_lto no lto *flags should be left after stripping.. --- config/functions | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config/functions b/config/functions index 4270094400..9069afccd4 100644 --- a/config/functions +++ b/config/functions @@ -165,9 +165,13 @@ do_autoreconf() { strip_lto() { # strip out LTO optimization from *FLAGS - CFLAGS=`echo $CFLAGS | sed -e "s|-flto||g"` - CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-flto||g"` - LDFLAGS=`echo $LDFLAGS | sed -e "s|-flto||g"` + if [ -n "$GCC_OPTIM_LTO" ] ; then + CFLAGS=`echo $CFLAGS | sed -e "s|$GCC_OPTIM_LTO||g"` + CXXFLAGS=`echo $CXXFLAGS | sed -e "s|$GCC_OPTIM_LTO||g"` + fi + if [ -n "$LD_OPTIM_LTO" ] ; then + LDFLAGS=`echo $LDFLAGS | sed -e "s|$LD_OPTIM_LTO||g"` + fi } strip_gold() {